summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bstraph.sh8
-rwxr-xr-xbin/debrel4
-rwxr-xr-xbin/git-dotfiles-update-master11
-rwxr-xr-xbin/locmaint1
-rwxr-xr-xbin/normalise-mrconfig13
5 files changed, 20 insertions, 17 deletions
diff --git a/bin/bstraph.sh b/bin/bstraph.sh
index 4983b710..8123bb7d 100755
--- a/bin/bstraph.sh
+++ b/bin/bstraph.sh
@@ -10,7 +10,13 @@ set -e
# ---- Perform the bootstrap
-$HOME/src/dotfiles/bin/normalise-mrconfig
+if ! [ -e "$HOME/.mrconfig" ]; then
+ cat >"$HOME/.mrconfig" <<EOF
+# -*- mode: conf -*-
+
+include = cat ~/src/dotfiles/lib-src/mr/config
+EOF
+fi
(
cd $HOME/src/dotfiles
mr fixups
diff --git a/bin/debrel b/bin/debrel
index 4d0678d1..fabdade9 100755
--- a/bin/debrel
+++ b/bin/debrel
@@ -34,8 +34,8 @@ dgit push-source "$@"
git push --follow-tags
# # if origin is not salsa, we might also want to push to salsa
-# # (.mrconfig.in should contain `git remote add -f salsa
-# # salsa:foo/bar` for this repo)
+# # (~/src/dotfiles/lib-src/mr/config should contain
+# # `git remote add -f salsa salsa:foo/bar` for this repo)
# if git remote | grep -q salsa \
# && git branch --contains salsa/$branch \
# | grep -qE " $branch$"; then
diff --git a/bin/git-dotfiles-update-master b/bin/git-dotfiles-update-master
index 201c4731..0a3ac34d 100755
--- a/bin/git-dotfiles-update-master
+++ b/bin/git-dotfiles-update-master
@@ -42,3 +42,14 @@ else
echo >&2 "uh oh, dotfiles remote head is not PGP-signed by Sean"
exit 1
fi
+
+# Migrate old normalise-mrconfig setup
+
+perl -000 -i'' -wn \
+ -e'/DO NOT EDIT THIS BLOCK; automatically updated/ or print' ~/.mrconfig
+
+line="include = cat ~/src/dotfiles/lib-src/mr/config"
+grep -Fxq "$line" ~/.mrconfig \
+ || printf "%s\n\n" \
+ "# -*- mode: conf -*-" "$line" "$(sed -e1,2d ~/.mrconfig)" \
+ >~/.mrconfig
diff --git a/bin/locmaint b/bin/locmaint
index 919d8c3a..9a7baa28 100755
--- a/bin/locmaint
+++ b/bin/locmaint
@@ -217,7 +217,6 @@ sub do_homedir {
my ($skip_update) = @_;
chdir;
- normalise_mrconfig();
src_register_all();
# Check places where temporary files are stored
diff --git a/bin/normalise-mrconfig b/bin/normalise-mrconfig
deleted file mode 100755
index 41b3e7e8..00000000
--- a/bin/normalise-mrconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env perl
-
-# normalise-mrconfig -- regenerate ~/.mrconfig
-#
-# This script must be as portable as possible (inc. its shebang).
-
-use strict;
-use warnings;
-use lib "$ENV{HOME}/src/dotfiles/perl5";
-
-use Local::Homedir;
-
-exit normalise_mrconfig();