|
@@ -421,12 +421,21 @@ if [ "" = "${HDIUTIL}" ]; then
|
421
|
421
|
# everything.
|
422
|
422
|
# I can't manage to get du to return the size that the files actually end up
|
423
|
423
|
# using on the image.
|
424
|
|
- while [ ${MVRES} -ne 0 ]; do
|
|
424
|
+ TRIES=0
|
|
425
|
+ while [ ${MVRES} -ne 0 -a ${TRIES} -ne 5 ]; do
|
|
426
|
+ TRIES=$((${TRIES} + 1))
|
|
427
|
+ echo "Previous ImageSize of ${IMAGESIZE} failed"
|
425
|
428
|
INCREASE=$((${INCREASE} + 5))
|
426
|
429
|
IMAGESIZE=$(((`du -s --block-size ${IMGBLOCKSIZE} ${DMG} | awk '{print $1}'` + ${INCREASE}) * ${IMGBLOCKSIZE} ))
|
|
430
|
+ echo "Trying to build with ImageSize ${IMAGESIZE}"
|
427
|
431
|
createImage ${IMAGESIZE}
|
428
|
432
|
done;
|
429
|
433
|
|
|
434
|
+ if [ ${MVRES} -eq 0 ]; then
|
|
435
|
+ echo "OSX Build Failed - Imagesize: ${IMAGESIZE}"
|
|
436
|
+ exit 1;
|
|
437
|
+ fi;
|
|
438
|
+
|
430
|
439
|
if [ "${LINUXIMAGE}" != "${RUNNAME}" ]; then
|
431
|
440
|
# Rename the image
|
432
|
441
|
mv ${LINUXIMAGE} ${RUNNAME}
|