diff options
author | Leah Rowe <leah@libreboot.org> | 2025-08-10 14:17:57 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-08-10 14:17:57 +0100 |
commit | d44c143846c15ba2032340db085f2ec31365182b (patch) | |
tree | 56f5b0febab7cb01fc00be6918459accd6693f00 /include/tree.sh | |
parent | 289c4e1c2fd4dfc7e396da37eb30b15dbcb33b8e (diff) |
tree.sh: rename hashtype to hashname
since it's the name, e.g. "default", referring to a
project tree (in this example, coreboot/default).
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/tree.sh')
-rw-r--r-- | include/tree.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/tree.sh b/include/tree.sh index e1d43417..ef1e4caa 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -187,28 +187,28 @@ project_up_to_date() { eval "`setvars "" old_hash hash`" hashdir="$1" - hashtype="$2" + hashname="$2" badhashvar="$3" shift 3 x_ mkdir -p "$XBMK_CACHE/$hashdir" - [ ! -f "$XBMK_CACHE/$hashdir/$project$hashtype" ] || \ - read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashtype" || \ - err "$hashdir: read err '$XBMK_CACHE/$hashdir/$project$hashtype'" + [ ! -f "$XBMK_CACHE/$hashdir/$project$hashname" ] || \ + read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashname" || \ + err "$hashdir: read err '$XBMK_CACHE/$hashdir/$project$hashname'" fx_ "x_ sha512sum" find "$@" -type f -not -path "*/.git*/*" | awk \ '{print $1}' > "$xbtmp/tmp.hash" || err "!h $project $hashdir" hash="$(x_ sha512sum "$xbtmp/tmp.hash" | awk '{print $1}' || \ - err)" || err "$hashtype: Can't read sha512 of '$xbtmp/tmp.hash'" + err)" || err "$hashname: Can't read sha512 of '$xbtmp/tmp.hash'" [ "$hash" != "$old_hash" ] && eval "$badhashvar=\"y\"" - [ -f "$XBMK_CACHE/$hashdir/$project$hashtype" ] || \ + [ -f "$XBMK_CACHE/$hashdir/$project$hashname" ] || \ eval "$badhashvar=\"y\"" - printf "%s\n" "$hash" > "$XBMK_CACHE/$hashdir/$project$hashtype" || \ - err "!mk $XBMK_CACHE/$hashdir/$project$hashtype" + printf "%s\n" "$hash" > "$XBMK_CACHE/$hashdir/$project$hashname" || \ + err "!mk $XBMK_CACHE/$hashdir/$project$hashname" eval "[ \"\$$badhashvar\" = \"y\" ] && return 1"; : } |