mirror of
https://gitlab.com/monolithify/base-image-build.git
synced 2024-11-29 13:46:24 +00:00
25 lines
429 B
Bash
25 lines
429 B
Bash
|
#!/bin/bash
|
||
|
export scriptLocation="$(dirname "$0")/"
|
||
|
export utilsLocation="$scriptLocation/../utils"
|
||
|
|
||
|
forceExit() {
|
||
|
exitCode=$1
|
||
|
|
||
|
echo "--- ERROR - Script exited with an error or was interrupted ---"
|
||
|
$utilsLocation/cleanup.sh
|
||
|
|
||
|
exit $exitCode
|
||
|
}
|
||
|
|
||
|
trap "forceExit 0" SIGINT
|
||
|
|
||
|
$scriptLocation/buildPushBootcContainerImage.sh
|
||
|
exitCode=$?
|
||
|
if [[ $exitCode -ne 0 ]];
|
||
|
then
|
||
|
forceExit $exitCode
|
||
|
else
|
||
|
$utilsLocation/cleanup.sh
|
||
|
fi
|
||
|
|