summaryrefslogtreecommitdiff
path: root/script/trees
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-07-17 18:39:42 +0100
committerLeah Rowe <leah@libreboot.org>2024-07-17 18:39:42 +0100
commit79f50b3791566852a909eb30d39c98df493d312e (patch)
treed403f1e9b69fd2fa0e48217360f3c15368ca7ea7 /script/trees
parenta9f9de885c07541934ecad56ea6c7126f05a89be (diff)
unify caching of files into cache/
hash/ becomes cache/hash/ repo/ becomes cache/repo/ Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/trees')
-rwxr-xr-xscript/trees14
1 files changed, 7 insertions, 7 deletions
diff --git a/script/trees b/script/trees
index 23164ee6..1e3a6c29 100755
--- a/script/trees
+++ b/script/trees
@@ -38,7 +38,7 @@ main()
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"
[ -z "$project" ] && for p in $(ls -1 config/git); do
./update trees $_f "$p" || $err "!./update trees $_f $p"
- [ "$XBMK_RELEASE" != "y" ] || x_ rm -Rf "repo/$p"; continue
+ [ "$XBMK_RELEASE" != "y" ] || x_ rm -Rf "cache/repo/$p"; :
done && return 1
[ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"
@@ -166,11 +166,11 @@ build_dependencies()
check_project_hashes()
{
- x_ mkdir -p hash
+ x_ mkdir -p cache/hash
old_pjhash=""
- [ ! -f "hash/$project$tree" ] || \
- read -r old_pjhash < "hash/$project$tree"
+ [ ! -f "cache/hash/$project$tree" ] || \
+ read -r old_pjhash < "cache/hash/$project$tree"
x_ rm -f "$TMPDIR/project.list" "$TMPDIR/project.hash" \
"$TMPDIR/project.tmp"; x_ touch "$TMPDIR/project.tmp"
@@ -193,10 +193,10 @@ check_project_hashes()
pjhash="$(sha512sum "$TMPDIR/project.hash" | awk '{print $1}')" || :
badhash="y" && [ "$pjhash" = "$old_pjhash" ] && badhash="n"
- [ -f "hash/$project$tree" ] || badhash="y"
+ [ -f "cache/hash/$project$tree" ] || badhash="y"
- printf "%s\n" "$pjhash" > "hash/$project$tree" || \
- $err "!mk hash/$project$tree"
+ printf "%s\n" "$pjhash" > "cache/hash/$project$tree" || \
+ $err "!mk cache/hash/$project$tree"
[ "$badhash" = "n" ] || rm -Rf "src/$project/$tree" \
"elf/$project/$tree" "elf/$project/$target" || \