Skip to content

Commit 0c54faf

Browse files
authored
Use new variable names
and 3x insert space before bracket
1 parent ff7d539 commit 0c54faf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/install-service.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ while [[ $# -gt 0 ]]; do
2323
K="$1"
2424
case $K in
2525
-p|--preempt)
26-
if [ "$2" == "yes" ] || [ "$2" == "no"]; then
26+
if [ "$2" == "yes" ] || [ "$2" == "no" ]; then
2727
PREEMPT="$2"
2828
shift
2929
else
@@ -32,7 +32,7 @@ while [[ $# -gt 0 ]]; do
3232
shift
3333
;;
3434
-l|--noled)
35-
if [ "$2" == "yes" ] || [ "$2" == "no"]; then
35+
if [ "$2" == "yes" ] || [ "$2" == "no" ]; then
3636
NOLED="$2"
3737
shift
3838
else
@@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do
4141
shift
4242
;;
4343
-b|--nobutton)
44-
if [ "$2" == "yes" ] || [ "$2" == "no"]; then
44+
if [ "$2" == "yes" ] || [ "$2" == "no" ]; then
4545
NOBUTTON="$2"
4646
shift
4747
else
@@ -103,11 +103,11 @@ if [ "$NOBUTTON" == "yes" ]; then
103103
fi
104104

105105
if ! [ "$1" == "" ]; then
106-
THRESHOLD=$1
106+
ON_THRESHOLD=$1
107107
fi
108108

109109
if ! [ "$2" == "" ]; then
110-
HYSTERESIS=$2
110+
(( OFF_THRESHOLD = ON_THRESHOLD - $2 ))
111111
fi
112112

113113

0 commit comments

Comments
 (0)