forked from paperwm/PaperWM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·36 lines (24 loc) · 851 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
REPO="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
UUID=paperwm@paperwm.github.com
EXT_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions
EXT="$EXT_DIR"/"$UUID"
mkdir -p "$EXT_DIR"
# Check if ext path already exists and if is a folder
if [[ ! -L "$EXT" && -d "$EXT" ]]; then
cat << EOF
INSTALL FAILED:
A previous (non-symlinked) installation of PaperWM already exists at:
"$EXT".
Please remove the installed version from that path and re-run this install script.
EOF
exit 1
fi
ln -snf "$REPO" "$EXT"
cat << EOF
INSTALL SUCCESSFUL:
If this is the first time installing PaperWM, then please logout/login
and enable the PaperWM extension, either with the Gnome Extensions application,
or manually by executing the following command from a terminal:
gnome-extensions enable ${UUID}
EOF