Add --force to install.sh

This commit is contained in:
Henrik Lissner 2014-09-29 15:36:20 -04:00
parent f451f1be1f
commit 5689399c7b

View file

@ -8,6 +8,7 @@ shopt -s extglob
for rcfile in "$HOME"/.dotfiles/!(bin|README.md|Gemfile|install.sh); do for rcfile in "$HOME"/.dotfiles/!(bin|README.md|Gemfile|install.sh); do
filep="$HOME/."$(basename "$rcfile") filep="$HOME/."$(basename "$rcfile")
[ "$1" == "--force" ] && rm -f "$filep"
[ -e "$filep" ] && continue [ -e "$filep" ] && continue
ln -vs "$rcfile" $filep ln -vsF "$rcfile" $filep
done done