summary refs log tree commit diff stats
path: root/hooks/post-up
diff options
context:
space:
mode:
authorAlan Pearce2014-07-03 19:56:30 +0100
committerAlan Pearce2014-07-03 19:56:30 +0100
commit75df2061a259258d85de7663d9f5e1dbc71a0ca8 (patch)
tree5022e27a91436520b7e01a782a2b920b21189114 /hooks/post-up
parent1b2ac613e3ee291ddf37b16f01d82343906e5d39 (diff)
downloaddotfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.tar.lz
dotfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.tar.zst
dotfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.zip
Fix zsh dotfile installation
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 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