summaryrefslogtreecommitdiff
path: root/script/update/project
diff options
context:
space:
mode:
Diffstat (limited to 'script/update/project')
-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}"