#!/bin/bash # # cf https://github.com/jcs/dotfiles/blob/master/move_in.sh # host="git.planhack.com" set -e mkdir -p ~/.ssh ~/pkg ~/tmp ~/var if ! test -e ~/.ssh/id_* ; then echo "Generating new keys..." ( cd ~/.ssh ssh-keygen -a 100 -t ed25519 -C `date +patrick-%F` ) fi echo -n "Has the pubkey been posted? " read ssh $host id cd ~/pkg pkgs="git bash vim make ssh" for i in $pkgs; do test -e ~/pkg/$i && { echo "local already has $i" continue } git clone ${host}:/var/www/git.haller.ws/pkg/$i make -C ~/pkg/$i install done echo "All done"