scripts: use end-of-options marker in find -exec commands

Closes #19450
This commit is contained in:
Viktor Szakats 2025-11-10 16:49:11 +01:00
parent a8e46c5ab1
commit 6aab1dc263
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
8 changed files with 13 additions and 13 deletions

View file

@ -91,7 +91,7 @@ jobs:
- name: 'pytype'
run: |
source ~/venv/bin/activate
find . -name '*.py' -exec pytype -j auto -k {} +
find . -name '*.py' -exec pytype -j auto -k -- {} +
- name: 'ruff'
run: |

View file

@ -587,7 +587,7 @@ jobs:
cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
ln -s libquiche.so target/release/libquiche.so.0
mkdir -v quiche/deps/boringssl/src/lib
find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf '{}' quiche/deps/boringssl/src/lib \;
find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \;
# include dir
# /home/runner/quiche/quiche/deps/boringssl/src/include

View file

@ -184,7 +184,7 @@ jobs:
fi
- name: 'curl info'
run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file '{}' \;
run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
run: |

View file

@ -310,7 +310,7 @@ jobs:
fi
- name: 'curl info'
run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file '{}' \;
run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
run: |

View file

@ -133,7 +133,7 @@ jobs:
timeout-minutes: 1
run: |
PATH=/usr/bin
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
PATH="$PWD/bld/lib:$PATH"
fi
@ -337,7 +337,7 @@ jobs:
# avoid libtool's curl.exe wrapper for shared builds
mv bld/src/.libs/curl.exe bld/src/curl.exe || true
fi
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
if [ "${MATRIX_TEST}" != 'uwp' ]; then # curl: error initializing curl library
bld/src/curl.exe --disable --version
fi
@ -548,7 +548,7 @@ jobs:
- name: 'curl -V'
timeout-minutes: 1
run: |
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
PATH="$PWD/bld/lib:$PATH"
bld/src/curl.exe --disable --version
@ -667,7 +667,7 @@ jobs:
fi
- name: 'curl info'
run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
if: ${{ matrix.build == 'cmake' && matrix.compiler != 'clang-tidy' }} # Save time by skipping this for autotools and clang-tidy
@ -907,7 +907,7 @@ jobs:
- name: 'curl -V'
timeout-minutes: 1
run: |
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
if [ "${MATRIX_PLAT}" != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll
PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH"
"bld/src/${MATRIX_TYPE}/curl.exe" --disable --version

View file

@ -91,7 +91,7 @@ pkgconfig_DATA = libcurl.pc
dist-hook:
rm -rf $(top_builddir)/tests/log
find $(distdir) -name "*.dist" -exec rm {} \;
find $(distdir) -name "*.dist" -exec rm -- {} \;
(distit=`find $(srcdir) -name "*.dist" | grep -v Makefile`; \
for file in $$distit; do \
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \

View file

@ -98,7 +98,7 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe"
fi
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
if [ -z "${SKIP_RUN:-}" ]; then
"${curl}" --disable --version
else

View file

@ -70,7 +70,7 @@ fi
# As a precaution, remove all *.dist files that may be lying around, to reduce
# the risk of old leftovers getting shipped.
echo "removing all old *.dist files"
find . -name "*.dist" -exec rm {} \;
find . -name "*.dist" -exec rm -- {} \;
numeric="$(printf "%02x%02x%02x\n" "$major" "$minor" "$patch")"
@ -184,7 +184,7 @@ retar() {
mkdir "$tempdir"
cd "$tempdir"
gzip -dc "../$targz" | tar -xf -
find curl-* -depth -exec touch -c -t "$filestamp" '{}' +
find curl-* -depth -exec touch -c -t "$filestamp" -- '{}' +
tar --create --format=ustar --owner=0 --group=0 --numeric-owner --sort=name curl-* | gzip --best --no-name > out.tar.gz
mv out.tar.gz ../
cd ..