shellcheck: fix lint of scripts in tests

This commit is contained in:
Otto Sabart 2022-08-16 21:00:00 +02:00 committed by Erik Arvstedt
parent a59c3b4b8a
commit f184bb34e6
No known key found for this signature in database
GPG key ID: 33312B944DD97846
14 changed files with 82 additions and 59 deletions

View file

@ -4,15 +4,18 @@
tmp=$(mktemp -d '/tmp/nix-bitcoin-src.XXXXX')
# Move source cache if it exists (atomic)
mv /tmp/nix-bitcoin-src $tmp/src 2>/dev/null || true
mv /tmp/nix-bitcoin-src "$tmp/src" 2>/dev/null || true
atExit() {
# Set the current src as the source cache (atomic)
mv -T $tmp/src /tmp/nix-bitcoin-src 2>/dev/null || true
rm -rf $tmp
mv -T "$tmp/src" /tmp/nix-bitcoin-src 2>/dev/null || true
rm -rf "$tmp"
}
trap "atExit" EXIT
rsync -a --delete --exclude='.git*' "$scriptDir/../" $tmp/src
# shellcheck disable=SC2154
rsync -a --delete --exclude='.git*' "$scriptDir/../" "$tmp/src"
echo "Copied src"
_nixBitcoinInCopiedSrc=1 $tmp/src/test/run-tests.sh "${args[@]}"
# shellcheck disable=SC2154
_nixBitcoinInCopiedSrc=1 "$tmp/src/test/run-tests.sh" "${args[@]}"