diff options
Diffstat (limited to 'resources/scripts/build/module/cbutils')
-rwxr-xr-x | resources/scripts/build/module/cbutils | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/resources/scripts/build/module/cbutils b/resources/scripts/build/module/cbutils index ee6e8692..8d4e2f2f 100755 --- a/resources/scripts/build/module/cbutils +++ b/resources/scripts/build/module/cbutils @@ -59,10 +59,17 @@ buildutils() { ./download coreboot $cbtree || return 1 fi for util in cbfstool ifdtool; do - utildir="coreboot/${cbtree}/util/${util}/" - make distclean -C "${utildir}" - make -j$(nproc) -C "${utildir}" \ - || return 1 + [ -f "cbutils/${cbtree}/${util}" ] \ + && continue + if [ ! -d "cbutils/${cbtree}" ]; then + mkdir -p "cbutils/${cbtree}" || return 1 + fi + + utildir="coreboot/${cbtree}/util/${util}" + make distclean -C "${utildir}" || return 1 + make -j$(nproc) -C "${utildir}" || return 1 + mv "${utildir}/${util}" "cbutils/${cbtree}" || return 1 + make distclean -C "${utildir}" || return 1 done } |