install.sh: overwrite symlinks (but only symlinks)

This commit is contained in:
Tor Hedin Brønner
2019-01-19 20:30:41 +01:00
parent 554ac341cb
commit f5f5d435fa
+8 -1
View File
@@ -1,3 +1,10 @@
#!/usr/bin/env bash
ln -s "$(realpath .)" ~/'.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org'
DEST=${XDG_DATA_HOME:-$HOME/.local/share}/'gnome-shell/extensions/paperwm@hedning:matrix.org'
if [[ -L "$DEST" || ! -e "$DEST" ]]; then
ln -fTs "$(realpath ./src)" "$DEST"
else
echo Install destination already exists: "$DEST"
echo " re run install to fix it."
fi