Fix some shellchecks issues
This commit is contained in:
parent
3ff244a3e5
commit
cfa15765e2
4 changed files with 10 additions and 5 deletions
|
@ -13,7 +13,7 @@ gracefulexit() {
|
|||
}
|
||||
|
||||
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
|
||||
return 0
|
||||
|
|
|
@ -18,7 +18,9 @@ export CACHEDIR="${XDG_CACHE_HOME:-$HOME/.cache}"/sxmo
|
|||
# shellcheck disable=SC2034
|
||||
export LOGDIR="${XDG_DATA_HOME:-$HOME/.local/share}"/sxmo/modem
|
||||
# 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
|
||||
export MODEMSTATEFILE="$XDG_RUNTIME_DIR/sxmo.modem.state"
|
||||
# shellcheck disable=SC2034
|
||||
|
@ -255,4 +257,5 @@ icon_bok=""
|
|||
icon_map=""
|
||||
|
||||
#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"
|
||||
fi
|
||||
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
|
||||
rm "$hook"
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(which sxmo_common.sh)"
|
||||
|
||||
UNSUSPENDREASON="$1"
|
||||
|
@ -16,7 +18,7 @@ REDLED_PATH="/sys/class/leds/red:indicator/brightness"
|
|||
BLUELED_PATH="/sys/class/leds/blue:indicator/brightness"
|
||||
|
||||
finish() {
|
||||
kill $BLINKPID
|
||||
kill "$BLINKPID"
|
||||
|
||||
echo 0 > "$REDLED_PATH"
|
||||
echo 0 > "$BLUELED_PATH"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue