script/setup/install-runc: Add trap statement to clean up tmp files
This PR adds the trap statement in the install runc script to clean up the temporary files and ensure we are not leaving them. Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
@@ -34,13 +34,13 @@ function install_runc() {
|
||||
: "${RUNC_REPO:=https://github.com/opencontainers/runc.git}"
|
||||
|
||||
TMPROOT=$(mktemp -d)
|
||||
trap "rm -fR ${TMPROOT}" EXIT
|
||||
git clone "${RUNC_REPO}" "${TMPROOT}"/runc
|
||||
pushd "${TMPROOT}"/runc
|
||||
git checkout "${RUNC_VERSION}"
|
||||
env -u VERSION make BUILDTAGS='seccomp' runc
|
||||
$SUDO make install
|
||||
popd
|
||||
rm -fR "${TMPROOT}"
|
||||
}
|
||||
|
||||
function install_crun() {
|
||||
|
||||
Reference in New Issue
Block a user