aboutsummaryrefslogtreecommitdiff
path: root/setup.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'setup.zsh')
-rwxr-xr-xsetup.zsh12
1 files changed, 11 insertions, 1 deletions
diff --git a/setup.zsh b/setup.zsh
index e46abc1..233a942 100755
--- a/setup.zsh
+++ b/setup.zsh
@@ -2,6 +2,16 @@
[[ $PWD = ~/.dotfiles ]] || exit 1
+if [[ $(uname -s) = FreeBSD ]]; then
+ if [[ -x /compat/linux/bin/ln ]]; then
+ LN=/compat/linux/bin/ln
+ else
+ echo "On FreeBSD and no GNU ln found, exiting"
+ exit 1
+ fi
+fi
+LN=${LN:-ln}
+
for i in dot.*; do
- ln -Ts .dotfiles/${i} ~/${i#dot}
+ ${LN} -Ts .dotfiles/${i} ~/${i#dot}
done