From 9b413a7a89d183aad2585115068b968e209c84a8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 2 Sep 2014 09:37:45 -0700 Subject: [PATCH] Update setup.sh: symlink bin directory --- setup.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index ae64b76..074fa7f 100755 --- a/setup.sh +++ b/setup.sh @@ -33,23 +33,39 @@ vimbundles=( \ # git clone $omzrepo $HOME/.oh-my-zsh #fi + +function link +{ + local dest + if [[ "$2" == '' ]]; then + dest="$HOME/.$dotfile" + else + dest="$2" + fi + + if [[ ! -e "$dest" ]]; then + action='Linking' + ln -fs "$1" "$dest" + else + action='Skipping' + fi + printf " %8s: %s\n" $action $dest +} + + print -P "%BSymlinking config files%b" for dotfile in `ls $dfdir`; do # metafiles; don't link them [[ $dotfile = 'setup.sh' ]] && continue [[ $dotfile = 'README.md' ]] && continue [[ $dotfile = 'py' ]] && continue + [[ $dotfile = 'bin' ]] && continue - local dest="$HOME/.$dotfile" - if [[ ! -L "$dest" ]]; then - action='Linking' - ln -fs "$dfdir/$dotfile" "$dest" - else - action='Skipping' - fi - printf " %8s: %s\n" $action $dest + link "$dfdir/$dotfile" done +link "$dfdir/bin" "$HOME/bin" + echo "touch $HOME/.hushlogin" touch "$HOME/.hushlogin"