Merge pull request #10760 from GabyCT/topic/runctrap

script/setup/install-runc: Add trap statement to clean up tmp files
This commit is contained in:
Maksym Pavlenko 2024-10-02 23:26:10 +00:00 committed by GitHub
commit 9c23fd71ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,13 +34,13 @@ function install_runc() {
: "${RUNC_REPO:=https://github.com/opencontainers/runc.git}" : "${RUNC_REPO:=https://github.com/opencontainers/runc.git}"
TMPROOT=$(mktemp -d) TMPROOT=$(mktemp -d)
trap "rm -fR ${TMPROOT}" EXIT
git clone "${RUNC_REPO}" "${TMPROOT}"/runc git clone "${RUNC_REPO}" "${TMPROOT}"/runc
pushd "${TMPROOT}"/runc pushd "${TMPROOT}"/runc
git checkout "${RUNC_VERSION}" git checkout "${RUNC_VERSION}"
env -u VERSION make BUILDTAGS='seccomp' runc env -u VERSION make BUILDTAGS='seccomp' runc
$SUDO make install $SUDO make install
popd popd
rm -fR "${TMPROOT}"
} }
function install_crun() { function install_crun() {