From 280b3b8897e5feb266fac0d3f4b3eb7dd72f3e02 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 15 Feb 2022 10:23:07 -0300 Subject: [PATCH] cleanup after build --- bootstrap.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 126c5be..bb68148 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,7 +1,13 @@ #!/bin/sh -set -e test -n "${EXTRA_PKGS}" && apk add --no-cache ${EXTRA_PKGS} test -n "${EXTRA_GEMS}" && gem install --no-user-install --no-document ${EXTRA_GEMS} su-exec builder /usr/local/bin/gem-compiler + +exit_status=$? + +test -n "${EXTRA_PKGS}" && apk del ${EXTRA_PKGS} +test -n "${EXTRA_GEMS}" && gem uninstall ${EXTRA_GEMS} + +exit ${exit_status}