mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
build: Fix shellcheck warnings in various old build and test scripts
Most of these scripts can probably just be deleted (see issue #2045), but for now it was easier to just mechanically fix the shellcheck warnings in them, rather than think about whether we actually needed the script. Fixes done using shellcheck 0.7.0 with default options. I haven’t tested any of the changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@@ -38,7 +38,7 @@ if ! type gdb >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
echo_v "Running gdb on assert-msg-test"
|
||||
OUT=$($LIBTOOL --mode=execute gdb --batch -x ${srcdir:-.}/assert-msg-test.gdb ./assert-msg-test 2> $error_out) || fail "failed to run gdb"
|
||||
OUT=$($LIBTOOL --mode=execute gdb --batch -x "${srcdir:-.}/assert-msg-test.gdb" ./assert-msg-test 2> $error_out) || fail "failed to run gdb"
|
||||
|
||||
echo_v "Checking if assert message is in __glib_assert_msg"
|
||||
if ! echo "$OUT" | grep -q '^$1.*"GLib:ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)"'; then
|
||||
|
@@ -13,25 +13,23 @@ echo_v ()
|
||||
fi
|
||||
}
|
||||
|
||||
error_out=/dev/null
|
||||
if [ "$1" = "-v" ]; then
|
||||
verbose=1
|
||||
error_out=/dev/stderr
|
||||
fi
|
||||
for I in ${srcdir:-.}/collate/*.in; do
|
||||
for I in "${srcdir:-.}"/collate/*.in; do
|
||||
echo_v "Sorting $I"
|
||||
name=`basename $I .in`
|
||||
./unicode-collate $I > collate.out
|
||||
name=$(basename "${I}" .in)
|
||||
./unicode-collate "${I}" > collate.out
|
||||
if [ $? -eq 2 ]; then
|
||||
exit 0
|
||||
fi
|
||||
diff collate.out ${srcdir:-.}/collate/$name.unicode ||
|
||||
diff collate.out "${srcdir:-.}/collate/$name.unicode" ||
|
||||
fail "unexpected error when using g_utf8_collate() on $I"
|
||||
./unicode-collate --key $I > collate.out
|
||||
diff collate.out ${srcdir:-.}/collate/$name.unicode ||
|
||||
./unicode-collate --key "${I}" > collate.out
|
||||
diff collate.out "${srcdir:-.}/collate/$name.unicode" ||
|
||||
fail "unexpected error when using g_utf8_collate_key() on $I"
|
||||
./unicode-collate --file $I > collate.out
|
||||
diff collate.out ${srcdir:-.}/collate/$name.file ||
|
||||
./unicode-collate --file "${I}" > collate.out
|
||||
diff collate.out "${srcdir:-.}/collate/$name.file" ||
|
||||
fail "unexpected error when using g_utf8_collate_key_for_filename() on $I"
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user