diff options
| author | Thomas Schneider <thosch97@gmail.com> | 2015-02-15 16:44:52 +0100 |
|---|---|---|
| committer | Thomas Schneider <thosch97@gmail.com> | 2015-02-15 16:44:52 +0100 |
| commit | 03c3e7d51e768f1e2dcf9893a72a07bd195a5f59 (patch) | |
| tree | 16b17bd7a7a7074999bcdd2d7c4950878fb748fb | |
| parent | c22976035dff3c9168538e3b0e5cf4f53a43a6d5 (diff) | |
Don’t break on FreeBSD
Signed-off-by: Thomas Schneider <thosch97@gmail.com>
| -rwxr-xr-x | setup.zsh | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |
