From d041fc711b513cf03aff609bf0272541cc9be0e5 Mon Sep 17 00:00:00 2001 From: Bertho Stultiens Date: Fri, 31 Jan 2025 14:50:09 +0100 Subject: [PATCH] Add double quotes where immediately possible. --- tests/build/header-sanity/test.sh | 10 +++++----- tests/build/ui/test.sh | 2 +- tests/interp/compile/test.sh | 2 +- tests/lowlevel/mutex/test.sh | 2 +- tests/rtapi_printf.0/test.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/build/header-sanity/test.sh b/tests/build/header-sanity/test.sh index 38fbdf6f501..d4907ba9d89 100755 --- a/tests/build/header-sanity/test.sh +++ b/tests/build/header-sanity/test.sh @@ -1,13 +1,13 @@ -#!/bin/sh +#!/bin/bash set -xe CPPFLAGS=$(pkg-config --silence-errors --cflags libtirpc) -for i in $HEADERS/*.h; do +for i in "$HEADERS"/*.h; do case $i in */rtapi_app.h) continue ;; esac - gcc ${CPPFLAGS} -DULAPI -I$HEADERS -E -x c $i > /dev/null + gcc ${CPPFLAGS} -DULAPI -I"$HEADERS" -E -x c "$i" > /dev/null done -for i in $HEADERS/*.h $HEADERS/*.hh; do +for i in "$HEADERS"/*.h "$HEADERS"/*.hh; do case $i in */rtapi_app.h) continue ;; */interp_internal.hh) continue ;; @@ -17,5 +17,5 @@ for i in $HEADERS/*.h $HEADERS/*.hh; do else ELEVEN=-std=c++0x fi - g++ ${CPPFLAGS} $ELEVEN -DULAPI -I$HEADERS -E -x c++ $i > /dev/null + g++ ${CPPFLAGS} "$ELEVEN" -DULAPI -I"$HEADERS" -E -x c++ "$i" > /dev/null done diff --git a/tests/build/ui/test.sh b/tests/build/ui/test.sh index b2dea7ed2b1..b8f44acf380 100644 --- a/tests/build/ui/test.sh +++ b/tests/build/ui/test.sh @@ -1,6 +1,6 @@ #!/bin/sh set -x -g++ -I${HEADERS} \ +g++ -I"${HEADERS}" \ nml-position-logger.cc \ -L "${LIBDIR}" -lnml -llinuxcnc \ -o /dev/null diff --git a/tests/interp/compile/test.sh b/tests/interp/compile/test.sh index 24e54b6b249..a27dfccaa06 100755 --- a/tests/interp/compile/test.sh +++ b/tests/interp/compile/test.sh @@ -3,5 +3,5 @@ set -xe g++ -o use-rs274 use-rs274.cc \ -Wall -Wextra -Wno-return-type -Wno-unused-parameter \ - -I $HEADERS $PYTHON_CPPFLAGS -L "$LIBDIR" -Wl,-rpath,$LIBDIR $PYTHON_EXTRA_LDFLAGS $PYTHON_LIBS $PYTHON_EXTRA_LIBS -lrs274 + -I "$HEADERS" $PYTHON_CPPFLAGS -L "$LIBDIR" -Wl,-rpath,"$LIBDIR" $PYTHON_EXTRA_LDFLAGS $PYTHON_LIBS $PYTHON_EXTRA_LIBS -lrs274 LD_BIND_NOW=YesPlease ./use-rs274 diff --git a/tests/lowlevel/mutex/test.sh b/tests/lowlevel/mutex/test.sh index 9c6afff1754..f1cab2ad9de 100755 --- a/tests/lowlevel/mutex/test.sh +++ b/tests/lowlevel/mutex/test.sh @@ -1,5 +1,5 @@ #!/bin/sh -gcc -O -I${HEADERS} test.c -o test -DULAPI -std=gnu99 -pthread || exit 1 +gcc -O -I"${HEADERS}" test.c -o test -DULAPI -std=gnu99 -pthread || exit 1 ./test; exitval=$? rm -f test exit $exitval diff --git a/tests/rtapi_printf.0/test.sh b/tests/rtapi_printf.0/test.sh index 2b396daa4f9..cb29b975ab2 100755 --- a/tests/rtapi_printf.0/test.sh +++ b/tests/rtapi_printf.0/test.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe -g++ -DULAPI -I${HEADERS} -std=c++0x -I${HEADERS} \ - -DSIM -rdynamic -L${LIBDIR} \ +g++ -DULAPI -I"${HEADERS}" -std=c++0x \ + -DSIM -rdynamic -L"${LIBDIR}" \ -o test_rtapi_vsnprintf test_rtapi_vsnprintf.c ./test_rtapi_vsnprintf