Skip to content

Commit fa5d709

Browse files
author
MarcoFalke
committed
ci: Move wrap-qemu into separate script
1 parent 890eac8 commit fa5d709

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

ci/test/06_script_b.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@ if [ -n "$QEMU_USER_CMD" ]; then
1111
# Generate all binaries, so that they can be wrapped
1212
DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
1313
DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
14-
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do
15-
# shellcheck disable=SC2044
16-
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do
17-
echo "Wrap $b ..."
18-
DOCKER_EXEC mv "$b" "${b}_orig"
19-
DOCKER_EXEC echo "\#\!/usr/bin/env bash" \> "$b"
20-
DOCKER_EXEC echo "$QEMU_USER_CMD \\\"${b}_orig\\\" \\\"\\\$@\\\"" \>\> "$b"
21-
DOCKER_EXEC chmod +x "$b"
22-
done
23-
done
14+
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
2415
END_FOLD
2516
fi
2617

ci/test/wrap-qemu.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do
10+
# shellcheck disable=SC2044
11+
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do
12+
echo "Wrap $b ..."
13+
mv "$b" "${b}_orig"
14+
echo '#!/usr/bin/env bash' > "$b"
15+
echo "$QEMU_USER_CMD \"${b}_orig\" \"\$@\"" >> "$b"
16+
chmod +x "$b"
17+
done
18+
done

0 commit comments

Comments
 (0)