From: Don Armstrong Date: Sun, 1 Sep 2019 17:17:44 +0000 (-0700) Subject: handle bin already existing X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=7a5c7c8f1f49808f6b124d018b40db9572693355 handle bin already existing --- diff --git a/new_home_directory b/new_home_directory index 706c1cb..57e7188 100755 --- a/new_home_directory +++ b/new_home_directory @@ -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