diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-28 18:38:23 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-28 18:38:23 +0100 |
commit | db65a5d9278775992954bf765bd23bcaa5bd4e4b (patch) | |
tree | 49497af57e49e1a2c9957473f8e656527259f6b7 | |
parent | 00d99adb5c1e0343bf889a260ea57b1292a3bc9c (diff) |
tree.sh: add error check in check_project_hashes()
when reading old_pjhash, we need to error out where a read
error occurs. such an error is unlikely, but could occur under
certain edge cases.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/tree.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/tree.sh b/include/tree.sh index 7bfddf67..3e80c333 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -167,7 +167,8 @@ check_project_hashes() { old_pjhash="" && x_ mkdir -p "$XBMK_CACHE/hash" [ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \ - read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" + read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" || \ + err "old_pjhash: Can't read '$XBMK_CACHE/hash/$project$tree'" fx_ "x_ sha512sum" find "$datadir" "$configdir/$tree" "$mdir" \ -type f -not -path "*/.git*/*" | awk '{print $1}' > \ |