summary refs log tree commit diff stats
path: root/hooks/post-up
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-up')
-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 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