From 03c3e7d51e768f1e2dcf9893a72a07bd195a5f59 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Sun, 15 Feb 2015 16:44:52 +0100 Subject: Don’t break on FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Schneider --- setup.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'setup.zsh') 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 -- cgit v1.2.3