Mercurial > hg > beaglert
diff scripts/build_pd_heavy.sh @ 549:ff0e9e827dcd prerelease
Updated uploader.py and build_pd_heavy for a more graceful failure
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 24 Jun 2016 12:42:48 +0100 |
parents | c301cc07ae11 |
children |
line wrap: on
line diff
--- a/scripts/build_pd_heavy.sh Fri Jun 24 04:49:40 2016 +0100 +++ b/scripts/build_pd_heavy.sh Fri Jun 24 12:42:48 2016 +0100 @@ -126,28 +126,31 @@ #TODO: get a reliable, exhaustive, up-to-date list. HEAVY_FILES='Heavy* Hv*' +check_board_alive set_date reference_time_file="$projectpath"/ uploadBuildRun(){ if [ $NO_UPLOAD -eq 0 ]; then # remove old static files to avoid obsolete errors - # make sure the path is not empty, so avoiding to rm -rf / by mistake - [ -z $projectpath ] && { echo 'ERROR: $projectpath is empty.'; exit 0; } + # make sure the path is not empty, so avoiding to rm -rf / by mistake + [ -z $projectpath ] && { echo 'ERROR: $projectpath is empty.'; exit 0; } # use -rf to prevent warnings in case they do not exist for file in $HEAVY_FILES - do - rm -rf "$projectpath"/$file - done + do + rm -rf "$projectpath"/$file + done + + echo "Invoking the online compiler..." # invoke the online compiler "$BELA_PYTHON27" $HVRESOURCES_DIR/uploader.py "$pdpath"/ -n $ENZIENAUDIO_COM_PATCH_NAME -g c -o "$projectpath" $RELEASE_STRING ||\ - { echo "ERROR: an error occurred while executing the uploader.py script"; exit 1; } + { echo "ERROR: an error occurred while executing the uploader.py script"; exit $?; } fi; echo ""; # Test that files have been retrieved from the online compiler. - # TODO: find a more reliable way of doing this. e.g.: have uploader.py fail with a non-zero error code. + # TODO: skip this now that uplodaer.py returns meaningful exit codes for file in $HEAVY_FILES; do ls "$projectpath"/$file >/dev/null 2>&1 || {