#!/bin/sh # makes a new home directory; defaults to one that does not use ssh GIT_BASE=http://git.donarmstrong.com/ if [ "$1" = "ssh" ]; then GIT_BASE=git+ssh://git.donarmstrong.com/srv/git/ fi; cd ~; for pkg in mr vcsh; do if ! which $pkg >/dev/null 2>&1; then 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 . ); 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 fi; fi; done; if [ "$1" = "ssh" ]; then mkdir -p .config/; (cd .config/; git checkout git+ssh://git.donarmstrong.com/srv/git_private/mr.git ); mr --config ~/.config/mr/config.d/base.git checkout else vcsh clone $GIT_BASE/mr.git mr; fi; mr checkout; if [ ! -e .ssh/authorized_keys ]; then (cd .ssh/; ln authorized_keys_default authorized_keys -s;) fi;