Browse Source

Fix shellcheck warnings.

Taffer 4 years ago
parent
commit
b0d5517b5e

+ 2 - 1
Menu/GameShell/30_RetroArch.sh

@@ -1 +1,2 @@
-retroarch 
+#!/bin/bash
+retroarch

+ 1 - 0
Menu/GameShell/31_CaveStory.sh

@@ -1 +1,2 @@
+#!/bin/bash
 retroarch -L /home/cpi/apps/emulators/nxengine_libretro.so /home/cpi/games/nxengine/cavestory/data

+ 1 - 2
Menu/GameShell/50_PICO-8/PICO-8.sh

@@ -1,5 +1,4 @@
 #!/bin/bash
 
-#SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico-8/pico8_dyn -splore -draw_rect 32,0,256,240
-cd /home/cpi/games/PICO-8/pico-8
+cd /home/cpi/games/PICO-8/pico-8 || exit
 SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico8_dyn -splore -draw_rect 32,0,256,240

+ 0 - 1
Menu/GameShell/50_PICO-8/Post-Up.sh

@@ -9,4 +9,3 @@ mkdir ~/.lexaloffle/pico-8/carts
 ln -s ~/.lexaloffle/pico-8/carts/ ~/games/PICO-8/carts
 
 touch .done
-

+ 1 - 1
bluetooth_firmware.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-FIRM=`cat /proc/driver/brcmf_fw`
+FIRM=$(cat /proc/driver/brcmf_fw)
 
 if [[ $FIRM =~ .*a0.* ]]
 then

+ 2 - 4
load.sh

@@ -1,9 +1,7 @@
 #!/bin/bash
 
-BASENAME=`dirname "$0"`
+BASENAME=$(dirname "$0")
 
-cd $BASENAME/sys.py
+cd "$BASENAME"/sys.py || exit
 
 python run.py
-
-

+ 7 - 7
sys.py/gsnotify/Jobs/00_lowpower.sh

@@ -1,15 +1,15 @@
 #!/bin/bash
 
-BAT_PNT=`upower -i $(upower -e | grep 'battery') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 `
+BAT_PNT=$(upower -i "$(upower -e | grep 'battery')" | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 )
 
 if [ "$BAT_PNT" -lt "20" ]; then
 
-	if [ "$BAT_PNT" -lt "5" ]; then
-		echo '{"type":"once","content":"Low Battery: 5% of battery remaining"}'
-	elif [ "$BAT_PNT" -lt "10" ]; then
-		echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}'
-	fi
+    if [ "$BAT_PNT" -lt "5" ]; then
+        echo '{"type":"once","content":"Low Battery: 5% of battery remaining"}'
+    elif [ "$BAT_PNT" -lt "10" ]; then
+        echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}'
+    fi
 
 else
-	echo $BAT_PNT
+    echo "$BAT_PNT"
 fi

+ 4 - 5
update.sh

@@ -1,14 +1,13 @@
 #!/bin/bash
 
-cd /home/cpi/launcher 
+cd /home/cpi/launcher || exit
 feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/updating.png
 git pull
-git reset --hard $1
+git reset --hard "$1"
 git submodule init
 git submodule update
 
-cd ~/apps/Menu && git pull && cd -
+cd ~/apps/Menu && git pull && cd - || exit
 
-feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/loading.png 
+feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/loading.png
 ./load.sh
-