diff options
Diffstat (limited to 'script/update/project/repo')
-rwxr-xr-x | script/update/project/repo | 5 |
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}" |