diff options
author | Alan Pearce | 2014-07-03 19:56:30 +0100 |
---|---|---|
committer | Alan Pearce | 2014-07-03 19:56:30 +0100 |
commit | 75df2061a259258d85de7663d9f5e1dbc71a0ca8 (patch) | |
tree | 5022e27a91436520b7e01a782a2b920b21189114 | |
parent | 1b2ac613e3ee291ddf37b16f01d82343906e5d39 (diff) | |
download | nixfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.tar.lz nixfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.tar.zst nixfiles-75df2061a259258d85de7663d9f5e1dbc71a0ca8.zip |
Fix zsh dotfile installation
-rwxr-xr-x | hooks/post-up/zsh | 10 |
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 |