1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2025-06-18 05:06:38 +02:00

Need to work on install script

This commit is contained in:
Eric Teunis de Boone 2016-09-21 01:22:14 +02:00
commit 0fd6e855bf
14 changed files with 202 additions and 0 deletions

34
install.sh Executable file
View file

@ -0,0 +1,34 @@
BASE="$HOME/.dotfiles"
BAKSUFFIX=".old"
symlink()
{
local COMMAND='ln -s '
[ $# -lt 2 ] && return 1
[ $# -gt 2 ] && [ "$3" = "-c" -o "$3" = "--copy" ] $COMMAND = 'echo "cp -r" '
if [ ! -h $2 ]; then
echo "MOVING mv \"$2\" \"$2$BAKSUFFIX\" "
fi
$COMMAND "$1" "$2"
}
# bash
symlink "${BASE}/bashrc" ~/.bashrc
symlink "${BASE}/bash_files/" ~/.bash_files
# vim
symlink "${BASE}/vimrc" ~/.vimrc
symlink "${BASE}/vim/" ~/.vim
# tmux
symlink "${BASE}/tmux.conf" ~/.tmux.conf
# ssh
symlink "${BASE}/ssh/" ~/.ssh