summaryrefslogtreecommitdiff
path: root/script/update/project/repo
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-04 21:43:03 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-04 21:45:29 +0100
commitbdf171e3ec30988eb9620eb1117cbcfe5e67a907 (patch)
treed01b62ad921c8dfa9df68bac100723cc89f09438 /script/update/project/repo
parent196f293a270cfb0caa18dafa79dafff7f8218080 (diff)
don't use /tmp/ for git clones. use tmp/ instead.
the /tmp/ file system may be a tmpfs, with conservative memory limits, depending on host system. it's more likely that the user will have enough disk space under tmp/ within lbmk (if they don't, they can't use lbmk anyway). that is to say: more likely that they would have the disk space, but not the memory. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/project/repo')
-rwxr-xr-xscript/update/project/repo5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/update/project/repo b/script/update/project/repo
index ba856612..24bd14ce 100755
--- a/script/update/project/repo
+++ b/script/update/project/repo
@@ -12,7 +12,7 @@ revision=""
location=""
url=""
bkup_url=""
-tmp_dir=""
+tmp_dir="tmp/gitclone"
depend=""
main()
@@ -70,7 +70,8 @@ verify_config()
clone_project()
{
- tmp_dir=$(mktemp -dt "${name}_XXXXX")
+ rm -Rf "${tmp_dir}" || fail "clone_project: cannot remove old tmpdir"
+ mkdir -p "${tmp_dir%/*}" || fail "clone_project: can't mkdir"
git clone ${url} "${tmp_dir}" || git clone ${bkup_url} "${tmp_dir}" || \
fail "clone_project: could not download ${name}"