summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-09-04 15:27:20 +0100
committerLeah Rowe <leah@libreboot.org>2025-09-04 15:27:20 +0100
commitddbefea475719d43996c502275bee1e1341460a2 (patch)
tree65dd6267db0086bfc4c82d4832b1a40f627a5cd3 /include
parentaa38608bffe6bcdf8e6f17f4f985044ee91e2da0 (diff)
Revert "get.sh: put tmpclone dirs in xbtmp"
This reverts commit 01a779d4ebcdfc7df406263aeb1dffb800eb0220. This commit broke ./mk -d coreboot for vendor files in lbmk.
Diffstat (limited to 'include')
-rw-r--r--include/get.sh13
-rw-r--r--include/tree.sh2
2 files changed, 7 insertions, 8 deletions
diff --git a/include/get.sh b/include/get.sh
index 9290ebe3..4926699b 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -3,7 +3,10 @@
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
- depend subcurl_bkup tmpgit`"
+ depend subcurl_bkup`"
+
+tmpgit="$xbtmp/gitclone"
+tmpgitcache="$XBMK_CACHE/tmpgit"
fetch_targets()
{
@@ -28,7 +31,7 @@ clone_project()
loc="$XBMK_CACHE/clone/$project" && singletree "$project" && \
loc="src/$project"
- e "$loc" d missing && git_prep \
+ e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \
"$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"; :
}
@@ -39,10 +42,6 @@ git_prep()
_patchdir="$3"
_loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
- tmpgit="`mktemp -d || err "can't make tmpgit"`" || err
- x_ rm -Rf "$tmpgit"
- x_ mkdir -p "${tmpgit%/*}"
-
chkvars rev
xbget git "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
if singletree "$project" || [ $# -gt 4 ]; then
@@ -135,9 +134,7 @@ try_copy()
try_git()
{
gitdest="`findpath "$1"`" || err "Can't get readpath for '$1'"
- tmpgitcache="`mktemp -d || err "can't make tmpgitcache"`" || err
x_ rm -Rf "$tmpgitcache"
- x_ mkdir -p "${tmpgitcache%/*}"
[ -d "$gitdest" ] || ( x_ git clone "$2" "$tmpgitcache" ) || return 1
[ -d "$gitdest" ] || x_ mkdir -p "${gitdest%/*}"
diff --git a/include/tree.sh b/include/tree.sh
index 25d6c5c0..a3b8de08 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -65,6 +65,8 @@ trees()
targets="$*"
cmd="build_targets $targets"
singletree "$project" && cmd="build_project"
+
+ remkdir "${tmpgit%/*}"
}
build_project()