1
0
Fork 0
mirror of synced 2024-11-10 11:48:58 -05: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 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 # first clone without checkout
debug "Doing an initial clone of the repository" debug "Doing an initial clone of the repository"
@ -2032,6 +2033,12 @@ function copy_perms {
return 0 return 0
} }
function mk_tmp_dir {
local tempdir="$YADM_DATA/tmp.$$.$RANDOM"
assert_parent "$tempdir/"
echo "$tempdir"
}
# ****** Prerequisites Functions ****** # ****** Prerequisites Functions ******
function require_archive() { function require_archive() {