aboutsummaryrefslogtreecommitdiff
path: root/setup.zsh
blob: 233a942e6defb953bb2ebe246b95c8a7d8d83b68 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env zsh

[[ $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}
done