diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-16 15:54:34 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-18 12:40:47 -0700 |
commit | 5b165f7a3b8ca561debd4920356ceeaa923fccfb (patch) | |
tree | f34e79ae241ed08d9ab6d956b1f7c8758b4de9ad /bin/git-dotfiles-update-master | |
parent | fb078c0fb7f275f802eb78531344ef848798646b (diff) | |
download | dotfiles-5b165f7a3b8ca561debd4920356ceeaa923fccfb.tar.gz |
attempt to replace normalise-mrconfig script w/ "include" directive
Diffstat (limited to 'bin/git-dotfiles-update-master')
-rwxr-xr-x | bin/git-dotfiles-update-master | 11 |
1 files changed, 11 insertions, 0 deletions
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 |