* admin/automerge: Use mktemp if it exists.

This commit is contained in:
Stefan Kangas 2021-11-10 13:01:30 +01:00
parent 4d99388c16
commit 99abafdd0d

View file

@ -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