diff --git a/install.sh b/install.sh index 3dd3579..8f04778 100755 --- a/install.sh +++ b/install.sh @@ -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