#!/bin/bash set -e cd $HOME mkdir -p git clone_repo() { repo=$1 dest_dir=$2 if [[ -e $dest_dir ]]; then return 0 fi if type git &>/dev/null; then git clone "git://git.server-speed.net/users/flo/$repo" "$dest_dir" else wget https://git.server-speed.net/users/flo/$repo/snapshot/master.tar.gz -O - | tar -C "$dest_dir" --strip-components 1 -xzf - fi } clone_repo bin bin clone_repo dotfiles git/dotfiles mkdir -p .config/htop for i in .zshrc .vimrc .screenrc .screenrc-2 .zprofile .config/htop/htoprc .dircolors .vim .gitconfig .gitignore .bashrc .zshenv .tmux.conf .i3 .i3status.conf; do ln -srf git/dotfiles/$i $i done mkdir -p .zsh touch .zshrc.local