X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=new_home_directory;h=3e492a37c7da0ff6bf9a4fc72a2349f38b44a489;hb=9e186b40ce36741d375de72ee5def0d8db21da2d;hp=706c1cb9562aa593dad3b39ae6c1b0b40ce427bc;hpb=4331e522ee9a81153f0dfb38a4aac1d7a653c5f2;p=bin.git diff --git a/new_home_directory b/new_home_directory index 706c1cb..3e492a3 100755 --- a/new_home_directory +++ b/new_home_directory @@ -18,9 +18,13 @@ for pkg in mr vcsh; do echo "Package $pkg doesn't exist; getting it" mkdir -p local_packages/$pkg; (cd local_packages/$pkg; + deb_name=$pkg + if [ $pkg == "mr"; ]; then + deb_name=myrepos + fi; if which apt-get >/dev/null 2>&1; then - apt-get download $pkg; - dpkg-deb -x $pkg*.deb . + apt-get download $deb_name; + dpkg-deb -x ${deb_name}*.deb . else # ok, this host isn't Debian. if [ "$pkg" == "mr" ]; then @@ -83,6 +87,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