diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-20 18:32:28 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-20 18:32:52 +0100 |
commit | 4e2ee58ac5282b1a7d5d65a264207f512f3e4a42 (patch) | |
tree | fb5a45057efc13fa3ab46c6d53ef816f85b3bd9e /resources/scripts/build | |
parent | 93ec91e86268416ca2945f616a3e57439d039714 (diff) |
build/ich9utils: simplify, fix error handling
errors weren't being handled inside a subshell
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-x | resources/scripts/build/module/ich9utils | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/resources/scripts/build/module/ich9utils b/resources/scripts/build/module/ich9utils index 925ed855..5473a513 100755 --- a/resources/scripts/build/module/ich9utils +++ b/resources/scripts/build/module/ich9utils @@ -2,7 +2,7 @@ # helper script: build ich9utils # -# Copyright (C) 2014, 2015, 2020 Leah Rowe <info@minifree.org> +# Copyright (C) 2014, 2015, 2020, 2023 Leah Rowe <info@minifree.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,15 +18,19 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# This script assumes that the current working directory is the root -# of libreboot_src or libreboot git - [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e -printf "Build ich9utils\n" -( -cd "util/ich9utils/" -make -j$(nproc) -) -printf "\n\n" +main() +{ + printf "Build ich9utils\n" + make -j$(nproc) -C "util/ich9utils" || err "make" +} + +err() +{ + printf "%s: %s\n" $0 $1 + exit 1 +} + +main $@ |