mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #197 from YunoHost/maniackcrudelis-patch-1
Remove helper ynh_mkdir_tmp
This commit is contained in:
commit
34b114e7a6
1 changed files with 4 additions and 5 deletions
|
@ -65,12 +65,11 @@ ynh_bind_or_cp() {
|
||||||
|
|
||||||
# Create a directory under /tmp
|
# Create a directory under /tmp
|
||||||
#
|
#
|
||||||
|
# Deprecated helper
|
||||||
|
#
|
||||||
# usage: ynh_mkdir_tmp
|
# usage: ynh_mkdir_tmp
|
||||||
# | ret: the created directory path
|
# | ret: the created directory path
|
||||||
ynh_mkdir_tmp() {
|
ynh_mkdir_tmp() {
|
||||||
TMPDIR="/tmp/$(ynh_string_random 6)"
|
echo "This helper is deprecated, you should use 'mktemp -d' instead." >&2
|
||||||
while [ -d $TMPDIR ]; do
|
mktemp -d
|
||||||
TMPDIR="/tmp/$(ynh_string_random 6)"
|
|
||||||
done
|
|
||||||
mkdir -p "$TMPDIR" && echo "$TMPDIR"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue