diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-09-30 17:26:22 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-10-02 10:01:04 -0400 |
commit | ddddd8961b6209cba1bcabad73916051a99f2025 (patch) | |
tree | dead4d1224f46a530d355850f803cc2d3d7b201e /ci/test/04_install.sh | |
parent | bb83d23ad8162b1bd31aae53fab1c1dee4523838 (diff) |
ci: Use busybox utils for one build
Diffstat (limited to 'ci/test/04_install.sh')
-rwxr-xr-x | ci/test/04_install.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 54d7a9b814..40a6d582ec 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -33,18 +33,29 @@ if [ -z "$RUN_CI_ON_HOST" ]; then DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$BASE_BUILD_DIR,dst=$BASE_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $BASE_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG) DOCKER_EXEC () { - docker exec $DOCKER_ID bash -c "cd $PWD && $*" + docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $PWD && $*" } else echo "Running on host system without docker wrapper" DOCKER_EXEC () { - bash -c "cd $PWD && $*" + bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $PWD && $*" } fi DOCKER_EXEC free -m -h -DOCKER_EXEC echo "Number of CPUs \(nproc\): $(nproc)" +DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) ${CI_RETRY_EXE} DOCKER_EXEC apt-get update ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES +if [ "$USE_BUSY_BOX" = "true" ]; then + echo "Setup to use BusyBox utils" + DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/ + # tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version) + # find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version) + # ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed) + # shellcheck disable=SC1010 + DOCKER_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) $BASE_SCRATCH_DIR/bins/\$util\; done + # Print BusyBox version + DOCKER_EXEC patch --help +fi |