summaryrefslogtreecommitdiff
path: root/resources/scripts/build/module
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/build/module')
-rwxr-xr-xresources/scripts/build/module/ich9utils24
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 $@