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
|
||
|
|