From 75df2061a259258d85de7663d9f5e1dbc71a0ca8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 3 Jul 2014 19:56:30 +0100 Subject: Fix zsh dotfile installation --- hooks/post-up/zsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh index f4720813..938701fe 100755 --- a/hooks/post-up/zsh +++ b/hooks/post-up/zsh @@ -4,7 +4,15 @@ ZDOTDIR="${XDG_CONFIG_HOME:=~/.config}/zsh" pushd $ZDOTDIR for f in z*(-.) do - [[ -e .$f ]] || ln $f .$f + if [[ -e $f ]] + then + if [[ ! -h .$f ]] + then + echo "$f already exists as a regular file, ignoring" + fi + else + ln -s $f .$f + fi done popd -- cgit 1.4.1