1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2024-10-27 20:34:27 +00:00

Remove mktemp dependency

This commit is contained in:
Tim Byrne 2021-02-03 22:46:48 -06:00
parent 9c999c7998
commit e6cfd39bbc
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12

9
yadm
View File

@ -752,7 +752,8 @@ function clone() {
}
local wc
wc="$(mktemp -d)" || error_out "Unable to create temporary directory"
wc="$(mk_tmp_dir)"
[ -d "$wc" ] || error_out "Unable to create temporary directory"
# first clone without checkout
debug "Doing an initial clone of the repository"
@ -2032,6 +2033,12 @@ function copy_perms {
return 0
}
function mk_tmp_dir {
local tempdir="$YADM_DATA/tmp.$$.$RANDOM"
assert_parent "$tempdir/"
echo "$tempdir"
}
# ****** Prerequisites Functions ******
function require_archive() {