diff options
author | Swift Geek <swiftgeek@gmail.com> | 2019-04-27 04:28:07 +0000 |
---|---|---|
committer | Gogs <gogitservice@gmail.com> | 2019-04-27 04:28:07 +0000 |
commit | 6d5f66cb2abb0dbed16782693e77363af4942065 (patch) | |
tree | 7b8af5674b835adebd8ec2ddde2f9461ca794a30 | |
parent | c38b833938ce0a705f5158d6b11396f0c3fcde8d (diff) | |
parent | 8c080431797cad48d5135ba5b2e5561a2ff81967 (diff) | |
download | librebootfr-6d5f66cb2abb0dbed16782693e77363af4942065.tar.gz librebootfr-6d5f66cb2abb0dbed16782693e77363af4942065.zip |
Merge branch 'bugs' of and_who/libreboot into master
-rwxr-xr-x | libs/project | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libs/project b/libs/project index 52888e32..8f4ef233 100755 --- a/libs/project +++ b/libs/project @@ -147,21 +147,26 @@ project_action() { return 0 fi - printf '%s\n\n' "Project $project $action (with ${arguments:-no argument})" - ( set +e - "$action" "$@" - ) + printf '%s\n' "Project $project $action (with ${arguments:-no argument})" - if [[ $? -eq 0 ]]; then - printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed" - else - printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed" + ( + "$action" "$@" + ) + + local -i exit_status=$? + + if ((exit_status)); then + printf 1>&2 '%s\n' "Project $project $action (with ${arguments:-no argument}) failed" + else + printf '%s\n' "Project $project $action (with ${arguments:-no argument}) completed" + fi + + exit $exit_status + ) - return 1 - fi } project_action_check() { |