Make build.sh respect Ctrl+C where possible

This commit is contained in:
BtbN 2021-06-10 16:44:04 +02:00
parent 981908d3ff
commit 5b5e41b0c6

View file

@ -50,7 +50,10 @@ rm -f "$TESTFILE"
rm -rf ffbuild
mkdir ffbuild
docker run --rm -i "${UIDARGS[@]}" -v $PWD/ffbuild:/ffbuild "$IMAGE" bash -s <<EOF
BUILD_SCRIPT="$(mktemp)"
trap "rm -f -- '$BUILD_SCRIPT'" EXIT
cat <<EOF >"$BUILD_SCRIPT"
set -xe
cd /ffbuild
rm -rf ffmpeg prefix
@ -64,6 +67,10 @@ docker run --rm -i "${UIDARGS[@]}" -v $PWD/ffbuild:/ffbuild "$IMAGE" bash -s <<E
make install install-doc
EOF
[[ -t 1 ]] && TTY_ARG="-t" || TTY_ARG=""
docker run --rm -i $TTY_ARG "${UIDARGS[@]}" -v $PWD/ffbuild:/ffbuild -v "$BUILD_SCRIPT":/build.sh "$IMAGE" bash /build.sh
mkdir -p artifacts
ARTIFACTS_PATH="$PWD/artifacts"
BUILD_NAME="ffmpeg-$(./ffbuild/ffmpeg/ffbuild/version.sh ffbuild/ffmpeg)-${TARGET}-${VARIANT}${ADDINS_STR:+-}${ADDINS_STR}"