summary refs log tree commit diff stats
path: root/hooks/post-up/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-up/zsh')
-rwxr-xr-xhooks/post-up/zsh10
1 files changed, 9 insertions, 1 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh
index f472081..938701f 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