#!/bin/bash [[ -e ~/.ssh/config ]] || { echo "setup ssh first"; exit 1; } which git &>/dev/null || { echo "need git"; exit 1; } for d in var tmp pkg projects; do [[ -d ~/${d} ]] || mkdir ~/${d} done ( cd $HOME && git clone git.haller.ws:/var/www/git.haller.ws/lib ) ( cd ~/pkg git clone git.haller.ws:/var/www/git.haller.ws/pkg/git ~/pkg/git/setup.sh ) ( cd ~/.ssh && scp git.haller.ws:.ssh/authorized_keys . ) for p in bash vim tmux; do ( cd ~/pkg && git cp $p && ~/pkg/${p}/setup.sh ) done [[ "$1" == "full" ]] || { echo "not installing full"; exit 0; } for p in mutt; do ( cd ~/pkg && git cp $p && ~/pkg/${p}/setup.sh ) done for p in bash,ssh-agent; do ( cd ~/projects && git cp $p && ~/pkg/${p}/setup.sh ) done