Skip to content

Commit e041ed5

Browse files
committed
sh: add missing quote, drop no longer used var, fixup printf mask, shellcheck warnings
1 parent 280e21e commit e041ed5

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

generate_fnmatch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# Redirect the output of this script to a test file.
4-
printf "$1\0$2\0"
4+
printf '%s\0%s\0' "$1" "$2"

mainline.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -ex
44

55
# Save off the current folder as the build root.
6-
export BUILD_ROOT=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
6+
export BUILD_ROOT; BUILD_ROOT=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
77
SCRIPTDIR=${BUILD_ROOT}/scripts
88

99
# Parse the options.
@@ -30,4 +30,4 @@ export CXXFLAGS="-fsanitize=address,fuzzer-no-link -stdlib=libstdc++ $FUZZ_FLAG"
3030
export CPPFLAGS="$FUZZ_FLAG"
3131
export OPENSSLFLAGS="-fno-sanitize=alignment -lstdc++"
3232

33-
${SCRIPTDIR}/compile_target.sh ${TARGET}
33+
"${SCRIPTDIR}"/compile_target.sh "${TARGET}"

ossfuzz.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
export BUILD_ROOT=$PWD
2626
SCRIPTDIR=${BUILD_ROOT}/scripts
2727

28-
. ${SCRIPTDIR}/fuzz_targets
29-
30-
GDBDIR=/src/gdb
28+
. "${SCRIPTDIR}"/fuzz_targets
3129

3230
echo "BUILD_ROOT: $BUILD_ROOT"
3331
echo "FUZZ_TARGETS: $FUZZ_TARGETS"
@@ -36,16 +34,16 @@ echo "FUZZ_TARGETS: $FUZZ_TARGETS"
3634
export CURL_SOURCE_DIR=/src/curl
3735

3836
# Compile the fuzzers.
39-
${SCRIPTDIR}/compile_target.sh fuzz
37+
"${SCRIPTDIR}"/compile_target.sh fuzz
4038

4139
# Zip up the seed corpus.
4240
scripts/create_zip.sh
4341

4442
# Copy the fuzzers over.
4543
for TARGET in $FUZZ_TARGETS
4644
do
47-
cp -v build/${TARGET} ${TARGET}_seed_corpus.zip $OUT/
45+
cp -v build/"${TARGET}" "${TARGET}"_seed_corpus.zip "$OUT"/
4846
done
4947

5048
# Copy dictionary and options file to $OUT.
51-
cp -v ossconfig/*.dict ossconfig/*.options $OUT/
49+
cp -v ossconfig/*.dict ossconfig/*.options "$OUT"/

0 commit comments

Comments
 (0)