From 0123bf08f118dac601fd3b6c3e8a532cc9c76dd2 Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Sat, 20 Oct 2018 17:30:42 -0700 Subject: Run shellcheck on utility scripts --- home/bin/backlight | 4 ++-- 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) " +[ -n "$rootfs" ] || fail "Usage: $(basename "$0") " [ -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 # -- cgit v1.2.3