From 808458ced5bcc5131d542e7e2fcb8120a613c8eb Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 20 Jun 2024 01:15:06 +0100 Subject: minor code cleanup in the build system Signed-off-by: Leah Rowe --- include/git.sh | 6 ++---- include/lib.sh | 6 ++---- include/vendor.sh | 9 +++------ 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index 2f9359c9..476dd2b6 100755 --- a/include/git.sh +++ b/include/git.sh @@ -57,15 +57,13 @@ fetch_project_repo() [ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \ x_ ./update trees -f coreboot "$xtree" [ -z "$depend" ] || for d in $depend ; do - printf "'%s' needs dependency '%s'; grabbing '%s' now\n" \ - "$project" "$d" "$d" + printf "'%s' needs '%s'; grabbing '%s'\n" "$project" "$d" "$d" x_ ./update trees -f $d done clone_project for x in config/git/*; do - [ -f "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null; \ - continue + [ -f "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null done } diff --git a/include/lib.sh b/include/lib.sh index 5952b202..2fc17cfe 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -181,8 +181,7 @@ mktarball() [ "${2%/*}" = "$2" ] || \ mkdir -p "${2%/*}" || $err "mk, !mkdir -p \"${2%/*}\"" printf "\nCreating archive: %s\n\n" "$2" - tar -c "$1" | xz -T$threads -9e > "$2" || \ - $err "mktarball 2, $1" + tar -c "$1" | xz -T$threads -9e > "$2" || $err "mktarball 2, $1" mksha512sum "$2" "${2##*/}.sha512" } @@ -190,8 +189,7 @@ mksha512sum() { ( [ "${1%/*}" != "$1" ] && x_ cd "${1%/*}" - sha512sum ./"${1##*/}" >> "$2" || \ - $err "!sha512sum \"$1\" > \"$2\"" + sha512sum ./"${1##*/}" >> "$2" || $err "!sha512sum \"$1\" > \"$2\"" ) || $err "failed to create tarball checksum" } diff --git a/include/vendor.sh b/include/vendor.sh index 54dac191..31b50889 100755 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -36,10 +36,7 @@ vendor_download() _b="${board%%_*mb}" # shorthand (no duplication per rom size) detect_firmware && exit 0 - scan_config "$_b" "config/vendor" - - build_dependencies_download - download_vendorfiles + scan_config "$_b" "config/vendor" && bootstrap && getfiles } detect_firmware() @@ -68,7 +65,7 @@ detect_firmware() printf "Vendor files not needed for: %s\n" "$board" 1>&2 } -build_dependencies_download() +bootstrap() { [ -d "$cbdir" ] || x_ ./update trees -f coreboot ${cbdir##*/} for d in uefitool biosutilities bios_extract; do @@ -86,7 +83,7 @@ build_dependencies_download() x_ ./update trees -b coreboot utils $tree } -download_vendorfiles() +getfiles() { [ -z "$CONFIG_HAVE_ME_BIN" ] || fetch intel_me "$DL_url" \ "$DL_url_bkup" "$DL_hash" "$CONFIG_ME_BIN_PATH" -- cgit v1.2.1