Commit 40a1389c authored by Jean-Claude BAU's avatar Jean-Claude BAU

wrs_build_all: Exit on error

Having just a small message indicating that a build error has been
detected at the end of the script is not sufficient. The tarball is
created but is invalid and might be used.
Now, when an error is detected the build procedure is immediately
aborted. The tarball is not then created.
parent da8cd5cd
......@@ -125,17 +125,13 @@ wrs_build_step () {
# I sometimes set WRS_SH_OPTIONS to "-x" to help me in debugging
bash $WRS_SH_OPTIONS $script
if [ $? -ne 0 ];
then failed_step=true;
else touch $markerfile
then
wrs_die "Building step $script failed. Build aborted !"
else
touch $markerfile
fi
}
failed_step=false; # this is set to "true" but the wrs_build_step function
# Now build the stuff one step at a time, only if not already done.
# Steps 0 and 11 are redone in any case:
# step 0 is downloading, and re-cecking md5sum has no side effects
......@@ -157,7 +153,4 @@ wrs_build_step 09-wrs-userspace wrs_build_userspace
wrs_build_step 10-wrs-gateware wrs_build_gateware
wrs_build_step 11-wrap-rootfs wrs_build_wraprootfs
if $failed_step; then
wrs_die "One or more build steps failed"
fi
wrs_echo "Complete build succeeded, apparently"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment