fix: set-{light,vol} calculations
This commit is contained in:
parent
2c856d8606
commit
fdba17e7ff
6 changed files with 6 additions and 7 deletions
|
@ -18,14 +18,13 @@ set +e
|
|||
CUR="$(cat "$CUR_FILE" || echo 50)"
|
||||
set -e
|
||||
|
||||
CUR="$((CUR - CUR % "$1"))"
|
||||
|
||||
case "${1:0:1}" in
|
||||
'')
|
||||
exit 1
|
||||
;;
|
||||
'+'|'-')
|
||||
NEW="$((CUR + "$1"))"
|
||||
NEW="$((CUR - CUR % $1 + $1))"
|
||||
;;
|
||||
*)
|
||||
NEW="$1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue