forked from obelisk79/OpenTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·50 lines (42 loc) · 885 Bytes
/
build.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
#!/usr/bin/env bash
QTSASS_FLAGS=()
WATCH=0
usage () {
echo "usage: $0 [-h|--help] [-w|--watch] [...qtsass flags]";
qtsass -h
}
build() {
if [[ $WATCH -eq 1 ]]; then
qtsass "$@" "${QTSASS_FLAGS[@]}" &
else
qtsass "$@" "${QTSASS_FLAGS[@]}"
fi
}
options=$(getopt -l "help,watch" -o "hw" -- "$@")
eval set -- "$options"
while true;
do
case "$1" in
-h|--help)
usage
exit 0
;;
-w|--watch)
QTSASS_FLAGS+=("-w")
WATCH=1
shift
;;
--)
shift
QTSASS_FLAGS+=("$@")
break;
esac
done
(
trap 'kill 0' SIGINT;
build ./scss/OpenLight.scss -o ./OpenLight/OpenLight.qss
build ./scss/OpenLight_Overlay.scss -o ./OpenLight/overlay/OpenLight_Overlay.qss
build ./scss/OpenDark.scss -o ./OpenDark/OpenDark.qss
build ./scss/OpenDark_Overlay.scss -o ./OpenDark/overlay/OpenDark_Overlay.qss
wait
)