mirror of
https://gitlab.com/monolithify/base-image-build.git
synced 2024-11-25 18:51: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
|
||
|
|