Skip to content

Commit b93a065

Browse files
committed
Fix shellcheck warnings
1 parent e4882aa commit b93a065

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gdb/linuxdeploy-plugin-gdb.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
# exit whenever a command called in this script fails
44
set -e
55

6+
7+
verbose=()
68
if [ "$DEBUG" != "" ]; then
79
set -x
8-
verbose="--verbose"
10+
verbose+=("--verbose")
911
fi
1012

1113
appdir=""
@@ -55,15 +57,15 @@ if [ -z "$LINUXDEPLOY_PLUGIN_GDB_SRC" ]; then
5557
fi
5658

5759
echo "Copying source files"
58-
cp --recursive $verbose "$LINUXDEPLOY_PLUGIN_GDB_SRC" "$appdir/usr/"
60+
cp --recursive "${verbose[@]}" "$LINUXDEPLOY_PLUGIN_GDB_SRC" "$appdir/usr/"
5961

6062
echo "Installing new AppRun wrapper"
6163
# AppRun script does: exec "$this_dir"/AppRun.wrapped "$@"
6264
# AppRun.wrapped (this script) is a wrapper on AppRun.wrapped.orig
6365
# AppRun.wrapped.orig is the real application
6466
old_exe="$(readlink -f "$appdir/AppRun.wrapped")"
6567
new_exe="$old_exe.orig"
66-
mv $verbose "$old_exe" "$new_exe"
68+
mv "${verbose[@]}" "$old_exe" "$new_exe"
6769
cat > "$old_exe" <<EOF
6870
#! /bin/bash
6971
@@ -73,4 +75,4 @@ else
7375
exec "\$APPDIR/${new_exe#"$appdir"}" "\$@"
7476
fi
7577
EOF
76-
chmod $verbose 755 "$old_exe"
78+
chmod "${verbose[@]}" 755 "$old_exe"

0 commit comments

Comments
 (0)