Fix some shellchecks issues

master
Stacy Harper 3 years ago
parent 3ff244a3e5
commit cfa15765e2
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 2
      scripts/core/sxmo_appmenu.sh
  2. 7
      scripts/core/sxmo_common.sh
  3. 2
      scripts/core/sxmo_migrate.sh
  4. 4
      scripts/core/sxmo_postwake.sh

@ -13,7 +13,7 @@ gracefulexit() {
} }
confirm() { confirm() {
PICKED="$(echo -e "Yes\nNo" | dmenu -l 16 -c -p "Confirm $1")" PICKED="$(printf "Yes\nNo\n" | dmenu -l 16 -c -p "Confirm $1")"
if [ "$PICKED" = "Yes" ]; then if [ "$PICKED" = "Yes" ]; then
return 0 return 0

@ -18,7 +18,9 @@ export CACHEDIR="${XDG_CACHE_HOME:-$HOME/.cache}"/sxmo
# shellcheck disable=SC2034 # shellcheck disable=SC2034
export LOGDIR="${XDG_DATA_HOME:-$HOME/.local/share}"/sxmo/modem export LOGDIR="${XDG_DATA_HOME:-$HOME/.local/share}"/sxmo/modem
# shellcheck disable=SC2034 # shellcheck disable=SC2034
export CONTACTFILE="${XDG_CONFIG_HOME:-$HOME/.config}/sxmo/contacts.tsv" export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
# shellcheck disable=SC2034
export CONTACTFILE="$XDG_CONFIG_HOME/sxmo/contacts.tsv"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
export MODEMSTATEFILE="$XDG_RUNTIME_DIR/sxmo.modem.state" export MODEMSTATEFILE="$XDG_RUNTIME_DIR/sxmo.modem.state"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
@ -255,4 +257,5 @@ icon_bok=""
icon_map="" icon_map=""
#allow the user to override icons #allow the user to override icons
[ -x "$XDG_CONFIG_HOME/sxmo/hooks/icons" ] && source "$XDG_CONFIG_HOME/sxmo/hooks/icons" # shellcheck disable=SC1091
[ -x "$XDG_CONFIG_HOME/sxmo/hooks/icons" ] && . "$XDG_CONFIG_HOME/sxmo/hooks/icons"

@ -52,7 +52,7 @@ checkhooks() {
$EDITOR "$hook" "$defaulthook" $EDITOR "$hook" "$defaulthook"
fi fi
else else
printf "\e[33mHook $hook is identical to the default, so you don't need a custom hook, remove it? [Y/n]\e[0m" printf "\e[33mHook %s is identical to the default, so you don't need a custom hook, remove it? [Y/n]\e[0m" "$hook"
if [ "n" != "$reply" ]; then if [ "n" != "$reply" ]; then
rm "$hook" rm "$hook"
fi fi

@ -1,5 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(which sxmo_common.sh)" . "$(which sxmo_common.sh)"
UNSUSPENDREASON="$1" UNSUSPENDREASON="$1"
@ -16,7 +18,7 @@ REDLED_PATH="/sys/class/leds/red:indicator/brightness"
BLUELED_PATH="/sys/class/leds/blue:indicator/brightness" BLUELED_PATH="/sys/class/leds/blue:indicator/brightness"
finish() { finish() {
kill $BLINKPID kill "$BLINKPID"
echo 0 > "$REDLED_PATH" echo 0 > "$REDLED_PATH"
echo 0 > "$BLUELED_PATH" echo 0 > "$BLUELED_PATH"

Loading…
Cancel
Save