commit 33b483472b1c6eb0c74eb51ed9e76ea579737e72 (patch)
parent 589fb34309a22bb9b372dd9fa8ee65a96f4222ce
Author: Alex Karle <alex@karle.co>
Date: Wed, 22 Jan 2020 22:38:55 -0500
install: switch ln flag -T for -n for OpenBSD
BSD ln doesn't support the -T option. However, it seems that -n does a
simlilar thing, and is better supported cross platform.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/install.sh b/install.sh
@@ -9,15 +9,14 @@ DOTFILES="$( cd "$(dirname "$0")" ; pwd -P )"
try_ln() {
if [ -e "$2" ]; then
if [ -h "$2" ]; then
- ln -sfT $1 $2
+ ln -snf $1 $2
echo "[Updated Link] $2" | sed "s#$HOME#~#"
else
echo "[Fail:Exists ] $2" | sed "s#$HOME#~#"
return
fi
else
- # Use 'T' to prevent nesting if the dir already exists
- ln -sfT $1 $2
+ ln -snf $1 $2
echo "[New ] $2" | sed "s#$HOME#~#"
fi
}