File tree Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 1111fi
1212
1313# Exit if the build root has not been defined.
14- . ${SCRIPTDIR} /fuzz_targets
14+ . " ${SCRIPTDIR} " /fuzz_targets
1515
1616if [[ ${DEBUG} == 1 ]]
1717then
4444 PERCALL=100
4545 fi
4646
47- find ${BUILD_ROOT} /corpora/${TARGET} / ${EXTRA_CORPUS} -type f -print0 | xargs -0 -L${PERCALL} ${BUILD_ROOT} /build/${TARGET}
47+ # shellcheck disable=SC2248
48+ find " ${BUILD_ROOT} /corpora/${TARGET} /" ${EXTRA_CORPUS} -type f -print0 | xargs -0 -L${PERCALL} " ${BUILD_ROOT} /build/${TARGET} "
4849 fi
4950done
Original file line number Diff line number Diff line change 2424TARGET=${1:- fuzz}
2525
2626SCRIPTDIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
27- export BUILD_ROOT=$( readlink -f " ${SCRIPTDIR} /.." )
27+ export BUILD_ROOT; BUILD_ROOT =$( readlink -f " ${SCRIPTDIR} /.." )
2828
2929# Check for GDB-specific behaviour by checking for the GDBMODE flag.
3030# - Compile with -O0 so that DEBUGASSERTs can be debugged in gdb.
3131if [[ -n ${GDBMODE:- } ]]
3232then
33- [[ -n ${CFLAGS :- } ]] && export CFLAGS=" ${CFLAGS} -O0 " || export CFLAGS= " -O0"
34- [[ -n ${CXXFLAGS :- } ]] && export CXXFLAGS=" ${CXXFLAGS} -O0 " || export CXXFLAGS= " -O0"
33+ export CFLAGS=" ${CFLAGS:- } -O0"
34+ export CXXFLAGS=" ${CXXFLAGS:- } -O0"
3535 CMAKE_GDB_FLAG=" -DBUILD_GDB=ON"
3636else
3737 CMAKE_GDB_FLAG=" -DBUILD_GDB=OFF"
@@ -58,13 +58,14 @@ echo "MAKEFLAGS: ${MAKEFLAGS}"
5858
5959# Create a build directory for the dependencies.
6060BUILD_DIR=${BUILD_ROOT} /build
61- mkdir -p ${BUILD_DIR}
61+ mkdir -p " ${BUILD_DIR} "
6262
6363options=' '
6464command -v ninja > /dev/null 2>&1 && options+=' -G Ninja'
6565
6666# Compile the dependencies.
67- pushd ${BUILD_DIR}
68- cmake ${CMAKE_GDB_FLAG} .. ${options}
69- cmake --build . --target ${TARGET} ${CMAKE_VERBOSE_FLAG}
67+ pushd " ${BUILD_DIR} "
68+ # shellcheck disable=SC2086
69+ cmake " ${CMAKE_GDB_FLAG} " .. ${options}
70+ cmake --build . --target " ${TARGET} " ${CMAKE_VERBOSE_FLAG}
7071popd
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ set -ex
55SCRIPTDIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
66BUILD_ROOT=$( readlink -f " ${SCRIPTDIR} /.." )
77
8- . ${SCRIPTDIR} /fuzz_targets
8+ . " ${SCRIPTDIR} " /fuzz_targets
99
1010for TARGET in ${FUZZ_TARGETS}
1111do
12- pushd ${BUILD_ROOT} /corpora/${TARGET}
13- zip ../../${TARGET} _seed_corpus.zip *
14- popd
12+ pushd " ${BUILD_ROOT} /corpora/${TARGET} "
13+ zip ../../" ${TARGET} _seed_corpus.zip" *
14+ popd
1515done
Original file line number Diff line number Diff line change 66# Use it to compile and install all the dependencies
77
88set -ex
9- SCRIPTDIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
109
1110# Work out if we need to install with sudo or not.
1211if [[ $( id -u) -eq 0 ]]
You can’t perform that action at this time.
0 commit comments