From bdf171e3ec30988eb9620eb1117cbcfe5e67a907 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 4 Sep 2023 21:43:03 +0100 Subject: 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 --- script/update/project/repo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'script/update') 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}" -- cgit v1.2.1