1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-17 04:22:32 +03:00

scripts: fix shellcheck SC2046 warnings

Also:
- use more `--` end-of-options markers.
- checksrc.sh: use literal quotes.

Closes #1739
This commit is contained in:
Viktor Szakats
2025-11-10 17:10:00 +01:00
parent 26a78929ce
commit f97fb271e3
6 changed files with 12 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ DISTCLEANFILES += ChangeLog
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"`; \
for file in $$distit; do \
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \

View File

@@ -6,7 +6,7 @@ set -eu
cd "$(dirname "$0")"/..
git ls-files "*.[ch]" "*.cc" | xargs -n1 \
git ls-files '*.[ch]' '*.cc' | xargs -n1 \
ci/checksrc.pl -i4 -m79 -AFIXME -AERRNOVAR -AFOPENMODE -ATYPEDEFSTRUCT \
-aaccept \
-afclose \

View File

@@ -57,4 +57,5 @@ cd "$(dirname "$0")"/..
--max-branches 12 \
--max-arguments 5 \
--max-localvars 15 \
--max-statements 50
--max-statements 50 \
--

View File

@@ -7,7 +7,7 @@ set -eu
cd "$(dirname "$0")"/..
# shellcheck disable=SC2046
git grep -z -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' | xargs -0 -r \
shellcheck --exclude=1091 \
--enable=avoid-nullary-conditions,deprecate-which \
$(grep -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' $(git ls-files))
--

View File

@@ -6,7 +6,8 @@ set -eu
cd "$(dirname "$0")"/..
# shellcheck disable=SC2046
codespell --skip='docs/AUTHORS' \
--ignore-words='ci/codespell-ignore.words' \
$(git ls-files)
git ls-files -z | xargs -0 -r \
codespell \
--skip 'docs/AUTHORS' \
--ignore-words 'ci/codespell-ignore.words' \
--

View File

@@ -124,7 +124,7 @@ retar() {
mkdir "$tempdir"
cd "$tempdir"
gzip -dc "../$targz" | tar -xf -
find libssh2-* -depth -exec touch -c -t "$filestamp" '{}' +
find libssh2-* -depth -exec touch -c -t "$filestamp" -- '{}' +
tar --create --format=ustar --owner=0 --group=0 --numeric-owner --sort=name libssh2-* | gzip --best --no-name > out.tar.gz
mv out.tar.gz ../
cd ..