various minor shellcheck fixes

master
Maarten van Gompel 4 years ago
parent 875e4b6f3a
commit f10d6cddaa
  1. 2
      scripts/core/sxmo_common.sh
  2. 2
      scripts/core/sxmo_open.sh
  3. 4
      scripts/core/sxmo_screenlock.sh
  4. 2
      scripts/core/sxmo_xinit.sh
  5. 2
      scripts/modem/sxmo_unlocksim.sh

@ -32,7 +32,7 @@ command -v "$EDITOR" > /dev/null || export EDITOR=vis
# user's computer # user's computer
#aliases aren't expanded in bash #aliases aren't expanded in bash
# shellcheck disable=SC2039 # shellcheck disable=SC2039,SC3044
command -v shopt > /dev/null && shopt -s expand_aliases command -v shopt > /dev/null && shopt -s expand_aliases
alias dmenu="sxmo_dmenu.sh" alias dmenu="sxmo_dmenu.sh"

@ -42,7 +42,7 @@ get_mimeapps_entries_from_desktop_dir() {
grep --include "*.desktop" '^MimeType=' "$desktop_path" \ grep --include "*.desktop" '^MimeType=' "$desktop_path" \
| tr ';' '\n' \ | tr ';' '\n' \
| cut -d= -f2 \ | cut -d= -f2 \
| xargs -i{} printf "%s=%s\n" "{}" "$(basename "$desktop_path")" | xargs -I{} printf "%s=%s\n" "{}" "$(basename "$desktop_path")"
done done
} }

@ -24,9 +24,9 @@ saveAllEventCounts() {
} }
whichWake() { whichWake() {
if [ "$(cat $WAKEUPRTC)" -gt "$(cat $OLD_RTC_WAKECOUNT)" ] ; then if [ "$(cat "$WAKEUPRTC")" -gt "$(cat "$OLD_RTC_WAKECOUNT")" ] ; then
echo "rtc" echo "rtc"
elif [ "$(cat $MODEMUPRTC)" -gt "$(cat $OLD_MODEM_WAKECOUNT)" ] ; then elif [ "$(cat "$MODEMUPRTC")" -gt "$(cat "$OLD_MODEM_WAKECOUNT")" ] ; then
echo "modem" echo "modem"
else else
# button does not have a active count so if it's none of the above, it has to be the button # button does not have a active count so if it's none of the above, it has to be the button

@ -104,7 +104,7 @@ customxinit() {
# shellcheck disable=SC1090 # shellcheck disable=SC1090
[ ! -e "$XDG_CONFIG_HOME/sxmo/xinit" ] && defaultconfig [ ! -e "$XDG_CONFIG_HOME/sxmo/xinit" ] && defaultconfig
# shellcheck disable=SC1090 # shellcheck disable=SC1090,SC1091
. "$XDG_CONFIG_HOME/sxmo/xinit" . "$XDG_CONFIG_HOME/sxmo/xinit"
set +o allexport set +o allexport
} }

@ -23,7 +23,7 @@ else
pkill dmenu #kill existing dmenu pkill dmenu #kill existing dmenu
while [ $retry -eq 1 ]; do while [ $retry -eq 1 ]; do
PICKED="$( PICKED="$(
# shellcheck disable=SC2039 # shellcheck disable=SC2039,SC3037
echo -e "Cancel\n0000\n1234" | sxmo_dmenu_with_kb.sh -l 3 -c -p "PIN:" | tr -d "\n\r " echo -e "Cancel\n0000\n1234" | sxmo_dmenu_with_kb.sh -l 3 -c -p "PIN:" | tr -d "\n\r "
)" )"
if [ -n "$PICKED" ] && [ "$PICKED" != "Cancel" ]; then if [ -n "$PICKED" ] && [ "$PICKED" != "Cancel" ]; then

Loading…
Cancel
Save