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:
commit
9c23fd71ed
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user