mirror of
https://github.com/TheLocehiliosan/yadm
synced 2026-03-02 03:49:29 +00:00
Remove mktemp dependency
This commit is contained in:
9
yadm
9
yadm
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user