diff --git a/danio_gcc.sh b/danio_gcc.sh index 330046a..6424cc8 100755 --- a/danio_gcc.sh +++ b/danio_gcc.sh @@ -150,18 +150,22 @@ runit() rm -rf build-* fi if ! download; then + trap - EXIT echo "Error at \"download_n_extract\" section" return 1 fi if ! build; then + trap - EXIT echo "Error at \"build\" section" return 1 fi if ! test_gcc; then + trap - EXIT echo "Error at \"test_gcc\" section" return 1 fi if ! strip_n_pack ${2}; then + trap - EXIT echo "Error at \"strip_n_pack ${2}\" section" return 1 fi @@ -274,5 +278,3 @@ else done runit "${arch}-danio-${BASE}" "${BINARY}" fi - -trap - EXIT