summaryrefslogtreecommitdiff
path: root/include/tree.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-08-10 14:15:55 +0100
committerLeah Rowe <leah@libreboot.org>2025-08-10 14:15:55 +0100
commit289c4e1c2fd4dfc7e396da37eb30b15dbcb33b8e (patch)
treee6d66629d36c355aed436da47e0d09134abcae6e /include/tree.sh
parentb31f2387ee13c243ee7bdc3e193d91fc1088d8bb (diff)
tree.sh: rename hashname to hashdir
since it's only ever used as a directory name Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/tree.sh')
-rw-r--r--include/tree.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/tree.sh b/include/tree.sh
index 0bdc44b0..e1d43417 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -186,29 +186,29 @@ delete_old_project_files()
project_up_to_date()
{
eval "`setvars "" old_hash hash`"
- hashname="$1"
+ hashdir="$1"
hashtype="$2"
badhashvar="$3"
shift 3
- x_ mkdir -p "$XBMK_CACHE/$hashname"
+ x_ mkdir -p "$XBMK_CACHE/$hashdir"
- [ ! -f "$XBMK_CACHE/$hashname/$project$hashtype" ] || \
- read -r old_hash < "$XBMK_CACHE/$hashname/$project$hashtype" || \
- err "$hashname: read err '$XBMK_CACHE/$hashname/$project$hashtype'"
+ [ ! -f "$XBMK_CACHE/$hashdir/$project$hashtype" ] || \
+ read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashtype" || \
+ err "$hashdir: read err '$XBMK_CACHE/$hashdir/$project$hashtype'"
fx_ "x_ sha512sum" find "$@" -type f -not -path "*/.git*/*" | awk \
- '{print $1}' > "$xbtmp/tmp.hash" || err "!h $project $hashname"
+ '{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'"
[ "$hash" != "$old_hash" ] && eval "$badhashvar=\"y\""
- [ -f "$XBMK_CACHE/$hashname/$project$hashtype" ] || \
+ [ -f "$XBMK_CACHE/$hashdir/$project$hashtype" ] || \
eval "$badhashvar=\"y\""
- printf "%s\n" "$hash" > "$XBMK_CACHE/$hashname/$project$hashtype" || \
- err "!mk $XBMK_CACHE/$hashname/$project$hashtype"
+ printf "%s\n" "$hash" > "$XBMK_CACHE/$hashdir/$project$hashtype" || \
+ err "!mk $XBMK_CACHE/$hashdir/$project$hashtype"
eval "[ \"\$$badhashvar\" = \"y\" ] && return 1"; :
}