X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=new_home_directory;h=57e71882b52638caa2bb7d460e459a85330704fa;hb=7a5c7c8f1f49808f6b124d018b40db9572693355;hp=3e348a40d6daff49878d4ff8f639196c466bf8b1;hpb=3cf6e2e65f0b9c42632eadb4b888afcf7a3237c1;p=bin.git diff --git a/new_home_directory b/new_home_directory index 3e348a4..57e7188 100755 --- a/new_home_directory +++ b/new_home_directory @@ -5,7 +5,7 @@ # makes a new home directory; defaults to one that does not use ssh -GIT_BASE=http://git.donarmstrong.com/ +GIT_BASE=https://git.donarmstrong.com/ if [ "$1" = "ssh" ]; then GIT_BASE=git+ssh://git.donarmstrong.com/srv/git/ @@ -18,13 +18,25 @@ for pkg in mr vcsh; do echo "Package $pkg doesn't exist; getting it" mkdir -p local_packages/$pkg; (cd local_packages/$pkg; - apt-get download $pkg; - dpkg-deb -x $pkg*.deb . + if which apt-get >/dev/null 2>&1; then + apt-get download $pkg; + dpkg-deb -x $pkg*.deb . + else + # ok, this host isn't Debian. + if [ "$pkg" == "mr" ]; then + wget http://http.debian.net/debian/pool/main/m/myrepos/myrepos_1.20160123_all.deb + ar p myrepos*.deb data.tar.xz|xz --decompress|tar -x + elif [ "$pkg" == "vcsh" ]; then + wget http://http.debian.net/debian/pool/main/v/vcsh/vcsh_1.20151229-1_all.deb + ar p vcsh*.deb data.tar.xz|xz --decompress|tar -x + fi; + + fi; ); mkdir -p bin ln ~/local_packages/$pkg/usr/bin/$pkg bin/$pkg -s if [ "$pkg" == "mr" ]; then - echo "include = cat ~/local_packages/$pkg/usr/share/mr/*" >> ~/.mrconfig + echo -e "[DEFAULT]\ninclude = cat ~/local_packages/$pkg/usr/share/mr/*" >> ~/.mrconfig fi; PATH="$HOME/local_packages/$pkg/usr/bin/:$PATH" export PATH @@ -71,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