diff options
author | Jakob Odersky <jakob@odersky.com> | 2018-10-20 17:30:42 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-10-20 17:30:42 -0700 |
commit | 0123bf08f118dac601fd3b6c3e8a532cc9c76dd2 (patch) | |
tree | 8cd9f1bdb4da0e6a9a5b40edfd313038ccbcf89e | |
parent | 30e7c35db5936c59078cbfd1d83632454add572f (diff) | |
download | dotfiles-0123bf08f118dac601fd3b6c3e8a532cc9c76dd2.tar.gz dotfiles-0123bf08f118dac601fd3b6c3e8a532cc9c76dd2.tar.bz2 dotfiles-0123bf08f118dac601fd3b6c3e8a532cc9c76dd2.zip |
Run shellcheck on utility scripts
-rwxr-xr-x | home/bin/backlight | 4 | ||||
-rwxr-xr-x | home/bin/chrootfs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/home/bin/backlight b/home/bin/backlight index d18e58c..553b79a 100755 --- a/home/bin/backlight +++ b/home/bin/backlight @@ -12,12 +12,12 @@ case "$1" in ;; dec) if [[ "$current" -gt 0 ]]; then - echo $(( $current - $step )) > "$device/brightness" + echo $(( current - step )) > "$device/brightness" fi ;; inc) if [[ "$current" -lt "$max" ]]; then - echo $(( $current + $step )) > "$device/brightness" + echo $(( current + step )) > "$device/brightness" fi ;; *) diff --git a/home/bin/chrootfs b/home/bin/chrootfs index 876a03f..5378d47 100755 --- a/home/bin/chrootfs +++ b/home/bin/chrootfs @@ -10,9 +10,9 @@ fail() { rootfs="$1" -[ -n "$rootfs" ] || fail "Usage: $(basename $0) <directory>" +[ -n "$rootfs" ] || fail "Usage: $(basename "$0") <directory>" [ -e "$rootfs" ] || fail "$rootfs does not exist" -[ "$EUID" -eq 0 ] || fail "$(basename $0) must be run as root" +[ "$EUID" -eq 0 ] || fail "$(basename "$0") must be run as root" # Unmount and remove any temporary files # |