Do not try to install image, if image creation failed.

This commit is contained in:
Achim D. Brucker 2018-07-14 06:02:11 +01:00
parent f91dba6c27
commit 8308aec962
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,11 @@ else
sudo singularity build ${IMAGE} ${BASE}.def
fi
if [ ! -f $IMAGE ]; then
echo "Image (${IMAGE}) creation failed!"
exit 1
fi
if [ "$INSTALL" = "true" ]; then
if [ -f $BINDIR/$IMAGE ]; then
mv $BINDIR/$IMAGE $BINDIR/$IMAGE.bak