]> git.donarmstrong.com Git - bin.git/commitdiff
handle bin already existing
authorDon Armstrong <don@donarmstrong.com>
Sun, 1 Sep 2019 17:17:44 +0000 (10:17 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 1 Sep 2019 17:17:44 +0000 (10:17 -0700)
new_home_directory

index 706c1cb9562aa593dad3b39ae6c1b0b40ce427bc..57e71882b52638caa2bb7d460e459a85330704fa 100755 (executable)
@@ -83,6 +83,14 @@ if [ ! -e .ssh/authorized_keys ]; then
     (cd .ssh/; ln authorized_keys_default authorized_keys -s; )
 fi;
 
+if [ ! -e ~/bin/.git ]; then
+    # OK, bin must have already existed; check it out directly
+    mv bin bin.tmp;
+    PATH=~/bin.tmp:$PATH mr checkout bin;
+    mv bin.tmp/* bin;
+    rmdir bin.tmp;
+fi;
+
 # do some cleanup; you might want to run git reset --hard in some
 # cases; we don't do so automatically in case there are local changes
 # that should be kept