mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Add double quotes to prevent globbing and word splitting
This fixes some issues which were reported by Codacy. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
6cb49dcebd
commit
08e9ba8b2e
@ -25,9 +25,9 @@ if [[ -z "${asciidoc}" ]] || [[ -z "${xsltproc}" ]]; then
|
||||
else
|
||||
for src in *.asc; do
|
||||
pagename=${src/.asc/}
|
||||
(${asciidoc} -d manpage ${src} &&
|
||||
${asciidoc} -d manpage -b docbook ${src} &&
|
||||
${xsltproc} --nonet ${man_xslt} ${pagename}.xml) ||
|
||||
(${asciidoc} -d manpage "${src}" &&
|
||||
${asciidoc} -d manpage -b docbook "${src}" &&
|
||||
${xsltproc} --nonet ${man_xslt} "${pagename}".xml) ||
|
||||
echo "Error generating ${pagename}"
|
||||
done
|
||||
fi
|
||||
|
@ -15,22 +15,22 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
cd $SRC/leptonica
|
||||
cd "$SRC"/leptonica
|
||||
./autogen.sh
|
||||
./configure --disable-shared
|
||||
make SUBDIRS=src install -j$(nproc)
|
||||
make SUBDIRS=src install -j"$(nproc)"
|
||||
ldconfig
|
||||
|
||||
cd $SRC/tesseract
|
||||
cd "$SRC"/tesseract
|
||||
./autogen.sh
|
||||
CXXFLAGS="$CXXFLAGS -D_GLIBCXX_DEBUG" ./configure --disable-graphics --disable-shared
|
||||
make -j$(nproc)
|
||||
make -j"$(nproc)"
|
||||
|
||||
# Get the models which are needed for the fuzzers.
|
||||
|
||||
mkdir -p $OUT/tessdata
|
||||
mkdir -p "$OUT"/tessdata
|
||||
(
|
||||
cd $OUT/tessdata
|
||||
cd "$OUT"/tessdata
|
||||
test -f eng.traineddata || \
|
||||
curl -L -O https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
|
||||
)
|
||||
@ -44,9 +44,9 @@ LEPTONICA_LIBS=$(pkg-config --static --libs lept)
|
||||
LIBTIFF_LIBS=$(pkg-config --static --libs libtiff-4 | sed 's/ -lm//')
|
||||
|
||||
$CXX $CXXFLAGS \
|
||||
-I $SRC/tesseract/include \
|
||||
$SRC/tesseract/unittest/fuzzers/fuzzer-api.cpp -o $OUT/fuzzer-api \
|
||||
$SRC/tesseract/.libs/libtesseract.a \
|
||||
-I "$SRC"/tesseract/include \
|
||||
"$SRC"/tesseract/unittest/fuzzers/fuzzer-api.cpp -o "$OUT"/fuzzer-api \
|
||||
"$SRC"/tesseract/.libs/libtesseract.a \
|
||||
$LEPTONICA_CFLAGS \
|
||||
-Wl,-Bstatic $LEPTONICA_LIBS $LIBTIFF_LIBS -Wl,-Bdynamic \
|
||||
$LIB_FUZZING_ENGINE
|
||||
@ -54,9 +54,9 @@ $CXX $CXXFLAGS \
|
||||
$CXX $CXXFLAGS \
|
||||
-DTESSERACT_FUZZER_WIDTH=512 \
|
||||
-DTESSERACT_FUZZER_HEIGHT=256 \
|
||||
-I $SRC/tesseract/include \
|
||||
$SRC/tesseract/unittest/fuzzers/fuzzer-api.cpp -o $OUT/fuzzer-api-512x256 \
|
||||
$SRC/tesseract/.libs/libtesseract.a \
|
||||
-I "$SRC"/tesseract/include \
|
||||
"$SRC"/tesseract/unittest/fuzzers/fuzzer-api.cpp -o "$OUT"/fuzzer-api-512x256 \
|
||||
"$SRC"/tesseract/.libs/libtesseract.a \
|
||||
$LEPTONICA_CFLAGS \
|
||||
-Wl,-Bstatic $LEPTONICA_LIBS $LIBTIFF_LIBS -Wl,-Bdynamic \
|
||||
$LIB_FUZZING_ENGINE
|
||||
|
Loading…
Reference in New Issue
Block a user