summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-03 18:14:59 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-03 18:18:41 +0100
commit8f828e6cd35d82b0a0fa20b202d49ab092161fa3 (patch)
tree916971274dddd6a578cbdd8fe6097b57ade8cf80 /mk
parent7a2f33264d713919bee5a6a4422f3664474b3420 (diff)
mk: tidy up check_project_hashes() sha512sum check
the extra function isn't needed at all. awk can just handle every line all at once. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'mk')
-rwxr-xr-xmk12
1 files changed, 3 insertions, 9 deletions
diff --git a/mk b/mk
index 06a77522..2020115b 100755
--- a/mk
+++ b/mk
@@ -277,9 +277,9 @@ check_project_hashes()
[ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \
read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree"
- x_ rm -f "$xbmktmp/project.hash"
- fx_ create_project_hash "$datadir" "$configdir/$tree" "$mdir" \
- -type f -not -path "*/.git*/*"
+ fx_ sha512sum "$datadir" "$configdir/$tree" "$mdir" \
+ -type f -not -path "*/.git*/*" | awk '{print $1}' > \
+ "$xbmktmp/project.hash" || $err "!h $project $tree"
pjhash="$(sha512sum "$xbmktmp/project.hash" | awk '{print $1}')" || :
[ "$pjhash" != "$old_pjhash" ] && badhash="y"
@@ -292,12 +292,6 @@ check_project_hashes()
"elf/$project/$tree" "elf/$project/$target"; :
}
-create_project_hash()
-{
- [ ! -f "$1" ] || x_ sha512sum "$1" | awk \
- '{print $1}' >> "$xbmktmp/project.hash" || $err "!h $1"; :
-}
-
check_cross_compiler()
{
xgccargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"