From 2c9f3065ee60f9c054e5be92041105ead382e105 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 3 May 2025 06:35:48 +0100 Subject: [PATCH] inject.sh: Only build nvmutil once Signed-off-by: Leah Rowe --- include/inject.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/inject.sh b/include/inject.sh index c60c297..bd01e68 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -44,6 +44,11 @@ inject() *) $err "Unrecognised inject mode: '$2'" esac + if [ -n "$new_mac" ] && [ "$new_mac" != "restore" ]; then + x_ make -C util/nvmutil clean + x_ make -C util/nvmutil + fi + check_release "$archive" || $err "'$archive' is not a release archive" if readcfg && readkconfig; then @@ -132,8 +137,7 @@ modify_mac() [ -n "$CONFIG_GBE_BIN_PATH" ] || return 1 x_ cp "${CONFIG_GBE_BIN_PATH##*../}" tmp/gbe - [ "$new_mac" != "restore" ] && x_ make -C util/nvmutil clean && \ - x_ make -C util/nvmutil && \ + [ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \ x_ "$nvm" tmp/gbe setmac "$new_mac" fe_ newmac "$tmpromdir" -maxdepth 1 -type f -name "*.rom"