bootc-base-image-build-mirror/scripts/buildPushBootcContainerImage/main.sh
2024-08-11 09:09:04 +00:00

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