]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Explicit checks
authorb3nj4m1n <b3nj4m1n@gmx.net>
Tue, 24 May 2022 19:26:19 +0000 (21:26 +0200)
committerb3nj4m1n <b3nj4m1n@gmx.net>
Tue, 24 May 2022 19:26:19 +0000 (21:26 +0200)
xdg-ninja.sh

index 3c9054a060210605429d0432cc70c700b0827353..698ee6747089ae7f2f6569257982155950fdd448 100755 (executable)
@@ -129,9 +129,9 @@ log() {
         ;;
 
     HELP)
         ;;
 
     HELP)
-        if $USE_GLOW; then
+        if [ "$USE_GLOW" = true ]; then
             decode_string "$HELP" | glow -
             decode_string "$HELP" | glow -
-        elif $USE_BAT; then
+        elif [ "$USE_BAT" = true ]; then
             decode_string "$HELP" | bat -pp --decorations=always --color=always --language markdown
         else
             decode_string "$HELP"
             decode_string "$HELP" | bat -pp --decorations=always --color=always --language markdown
         else
             decode_string "$HELP"
@@ -157,12 +157,12 @@ check_file() {
         ;;
 
     1)
         ;;
 
     1)
-        if [ "$MOVABLE" ]; then
+        if [ "$MOVABLE" = true ]; then
             log ERR "$NAME" "$FILENAME" "$HELP"
         else
             log WARN "$NAME" "$FILENAME" "$HELP"
         fi
             log ERR "$NAME" "$FILENAME" "$HELP"
         else
             log WARN "$NAME" "$FILENAME" "$HELP"
         fi
-        if [ "$HELP" ]; then
+        if [ "$HELP" = true ]; then
             log HELP "$NAME" "$FILENAME" "$HELP"
         else
             log HELP "$NAME" "$FILENAME" "_No help available._"
             log HELP "$NAME" "$FILENAME" "$HELP"
         else
             log HELP "$NAME" "$FILENAME" "_No help available._"