mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
tree.sh: add sha512 error for check_project_hashes
handle errors on sha512sum - also handle awk errors inside the mini subshell, and provide overall error handling. we know that the project.hash file should always exist, and always be read no matter what; technically, the find command that proceeds it might not yield any results, but an empty file would then be produced. the edge case of an empty file would have lead to an error beforehand, when configuring the project in function, configure_project(), so we've already got that covered. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -184,7 +184,8 @@ check_project_hashes()
|
||||
-type f -not -path "*/.git*/*" | awk '{print $1}' > \
|
||||
"$xbtmp/project.hash" || err "!h $project $tree"
|
||||
|
||||
pjhash="$(sha512sum "$xbtmp/project.hash" | awk '{print $1}')" || :
|
||||
pjhash="$(x_ sha512sum "$xbtmp/project.hash" | awk '{print $1}' || \
|
||||
err)" || err "pjhash: Can't read sha512 of '$xbtmp/project.hash'"
|
||||
[ "$pjhash" != "$old_pjhash" ] && badhash="y"
|
||||
[ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user