Skip to content
Snippets Groups Projects
Commit a8bd4680 authored by Bob Mottram's avatar Bob Mottram
Browse files

Check for make failure

parent 4789e666
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,12 @@ make $IMAGE_TYPE \
SSH_PUBKEY="$SSH_PUBKEY" \
GENERIC_IMAGE="$GENERIC_IMAGE"
if [ ! "$?" = "0" ]; then
echo 'Build failed'
rm -rf $BUILD_DIR
exit 1
fi
EXPECTED_EXTENSION='img'
if [[ $IMAGE_TYPE == "qemu"* ]]; then
EXPECTED_EXTENSION='qcow2'
......@@ -209,7 +215,7 @@ imgfiles=(build/${PROJECT_NAME}*.${EXPECTED_EXTENSION})
if [ ${#imgfiles[@]} -eq 0 ]; then
echo 'Image was not created'
rm -rf $BUILD_DIR
exit 1
exit 2
fi
mv build/${PROJECT_NAME}*.bz2 ${CURR_DIR}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment