forked from pi-hole/PADD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchronometer2.sh
More file actions
37 lines (28 loc) · 782 Bytes
/
Copy pathchronometer2.sh
File metadata and controls
37 lines (28 loc) · 782 Bytes
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
#!/usr/bin/env bash
# update Chronometer2!
yellowText=$(tput setaf 3) # Yellow
resetText=$(tput sgr0) # Reset to default color
checkBoxInfo="[${yellowText}i${resetText}]" # Info / i
OutputJSON() {
echo "[i] Please update Chronometer2 to PADD! (See https://github.com/jpmck/PADD)"
}
DisplayHelp() {
cat << EOM
::: [i]Please update Chronometer2 to PADD! (See https://github.com/jpmck/PADD)
EOM
exit 0
}
if [[ $# = 0 ]]; then
clear
if [ -e "chronometer2.pid" ]; then
rm -f chronometer2.pid
fi
echo "${checkBoxInfo} Please update Chronometer2 to PADD! (See https://github.com/jpmck/PADD)"
fi
for var in "$@"; do
case "$var" in
"-j" | "--json" ) OutputJSON;;
"-h" | "--help" ) DisplayHelp;;
* ) exit 1;;
esac
done