shellcheck: fix lint of scripts in tests
This commit is contained in:
parent
a59c3b4b8a
commit
f184bb34e6
14 changed files with 82 additions and 59 deletions
|
|
@ -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[@]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue