From 9be8602ba75fe9d40b1c6c323d1631b34869c70c Mon Sep 17 00:00:00 2001 From: Phantop Date: Thu, 25 May 2023 11:59:27 -0400 Subject: [PATCH] Fix some small shellcheck issues --- appdwarf | 3 ++- apps/mkwine | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/appdwarf b/appdwarf index 621fa66..acdb163 100755 --- a/appdwarf +++ b/appdwarf @@ -11,6 +11,7 @@ apprun() { bundlehead() { MOUNTBIN=$(mktemp) # use provided offsets to supply dwarfs binary tail -n+"$OFF" "$0" | head -n"$LEN" | head -c-1 | zstd -cqd > "$MOUNTBIN" + #shellcheck disable=SC2317 dwarfs() { chmod +x "$MOUNTBIN"; "$MOUNTBIN" "$@"; rm "$MOUNTBIN"; } } @@ -130,7 +131,7 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage if aria2c -x16 -s16 "$1" -o "$app" || wget "$1" -O "$app"; then shift set -- "$app" "$@" - test $FETCH && chmod +x "$1" && exit + test "$FETCH" && chmod +x "$1" && exit else tput setaf 1; echo "No valid remote or local input found. Exiting..." >&2 rm -f "$app"; exit 1 diff --git a/apps/mkwine b/apps/mkwine index 78a90bb..d2dddf7 100755 --- a/apps/mkwine +++ b/apps/mkwine @@ -11,7 +11,7 @@ mv "$DIR"/wine*/* "$DIR"/GE-Proton*/files/* "$DIR"/lutris*/* "$DIR" || true t=winetricks; wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t chmod +x "$DIR"/bin/$t -if [ $PREFIX ]; then +if [ "$PREFIX" ]; then WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit cat > "$DIR/AppRun" << 'EOF' #!/bin/sh