This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·65 lines (58 loc) · 1.5 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /bin/sh
DIR="$(dirname "${BASH_SOURCE[0]}")"
DIR="$(realpath "${DIR}")"
POSITIONAL_ARGS=()
help () {
echo "
Usage:
--default [-d]
--god-mode [-gm]
Default:
Install a default configuration for bspwm with sxhkd and xsecurelock.
Also adds a zsh config.
God mode:
Install's my personal configuration, this is not guaranteed to work.
I continuously adjust this configuration, and don't test it often to be able to use it on other systems.
"
}
while [[ $# -gt 0 ]]; do
case $1 in
-d|--default)
DEFAULT="$1"
shift
;;
-gm|--god-mode)
GODMODE="$1"
shift
;;
-y|--yes)
ALLYES="$1"
shift
;;
-h|--help)
help
exit 1
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
*)
POSITIONAL_ARGS+=("$1")
shift
;;
esac
done
if [ -n "$DEFAULT" ]; then
read -r -p "Are you sure you want to install a default configuration? [y/N] " install_question
if [[ "$install_question" =~ ^([yY][eE][sS]|[yY])$ ]]; then
source "$DIR/default/install.sh"
fi
elif [ -n "$GODMODE" ]; then
read -r -p "Are you sure you want to install the god mode configuration? [y/N] " install_question
if [[ "$install_question" =~ ^([yY][eE][sS]|[yY])$ ]]; then
source "$DIR/god-mode/install.sh"
fi
else
help
fi