Appease ShellCheck

ShellCheck has started failing in CI. My guess is that the ubuntu-latest runner
now uses a `/bin/sh` that is actually Bash.

- excludes checksec.sh, as it’s not our code
- fixes lints in other files
This commit is contained in:
Greg Pfeil 2022-12-06 10:38:33 -07:00
parent 826e0dccb1
commit 4946316537
5 changed files with 10 additions and 10 deletions

View File

@ -55,4 +55,4 @@ fi
zcash-fetch-params
touch .zcash/zcash.conf
echo "Starting: ${ZCASHD_CMD}"
eval exec "${ZCASHD_CMD}" "${@}"
exec "${ZCASHD_CMD}" "${@}"

View File

@ -13,14 +13,14 @@
# one. Any remaining diff signals an error.
export LC_ALL=C
if test "x$1" = "x"; then
if test -z "$1"; then
echo "Usage: $0 <commit>..."
exit 1
fi
# Check that the working tree is clean (as this script performs hard resets).
TREE_CHANGES=$(git diff HEAD | wc -l)
if test "x$TREE_CHANGES" != "x0"; then
if test "$TREE_CHANGES" != "0"; then
echo "The working tree is not clean."
exit 1
fi
@ -32,7 +32,7 @@ for commit in $(git rev-list --reverse $1); do
if git rev-list -n 1 --pretty="%s" $commit | grep -q "^scripted-diff:"; then
git checkout --quiet $commit^ || exit
SCRIPT="$(git rev-list --format=%b -n1 $commit | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
if test "x$SCRIPT" = "x"; then
if test -z "$SCRIPT"; then
echo "Error: missing script for: $commit"
echo "Failed"
RET=1

View File

@ -40,7 +40,7 @@ if ! command -v shellcheck > /dev/null; then
fi
EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
if ! shellcheck "$EXCLUDE" $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
if ! shellcheck "$EXCLUDE" $(git ls-files -- '*.sh' | grep -vE '(qa/zcash/checksec\.sh|src/(|leveldb|secp256k1|univalue)/)'); then
EXIT_CODE=1
fi

View File

@ -40,7 +40,7 @@ if [ -z "${CONFIGURE_FLAGS-}" ]; then
CONFIGURE_FLAGS=""
fi
if [ "x$*" = 'x--help' ]
if [ "$*" = '--help' ]
then
cat <<EOF
Usage:

View File

@ -225,7 +225,7 @@ EOF
fetch_params "$SAPLING_SPROUT_GROTH16_NAME" "$PARAMS_DIR/$SAPLING_SPROUT_GROTH16_NAME" "b685d700c60328498fbde589c8c7c484c722b788b265b72af448a5bf0ee55b50"
}
if [ "x${1:-}" = 'x--testnet' ]
if [ "${1:-}" = '--testnet' ]
then
echo "NOTE: testnet now uses the mainnet parameters, so the --testnet argument"
echo "is no longer needed (ignored)"