dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit 58e9c5e42e47c482fb5ca4d45c9c5f7fb4cfecde
parent e19bafe2356e8a94a7ae4ed1fb292db764785f95
Author: Duncaen <mail@duncano.de>
Date:   Sat, 17 Jun 2017 21:00:15 +0200

install: avoid symlink loop

Diffstat:
install.sh | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git 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" }