aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index c225f28..10c1369 100755
--- a/install.sh
+++ b/install.sh
@@ -5,6 +5,7 @@ msg() { t=$1; shift; printf '%s: %s\n' "$t" "$@"; }
_ln_home() {
[ -z "$2" ] && tgt="$HOME/$1" || tgt="$HOME/$2"
src="$PWD/$1"
+ [ -e "$tgt.bak" ] && rm "$tgt.bak"
[ -e "$tgt" ] && mv "$tgt" "$tgt.bak"
ln -sf "$src" "$tgt"
}