* admin/automerge: Use mktemp if it exists.
This commit is contained in:
parent
4d99388c16
commit
99abafdd0d
1 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,11 @@ OPTIND=1
|
|||
[ "$test" ] && build=1
|
||||
|
||||
|
||||
tempfile=/tmp/$PN.$$
|
||||
if [ -x "$(command -v mktemp)" ]; then
|
||||
tempfile=$(mktemp "/tmp/$PN.XXXXXXXXXX")
|
||||
else
|
||||
tempfile=/tmp/$PN.$$
|
||||
fi
|
||||
|
||||
trap "rm -f $tempfile 2> /dev/null" EXIT
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue