]> git.eshelyaron.com Git - emacs.git/commitdiff
* admin/automerge: Use mktemp if it exists.
authorStefan Kangas <stefan@marxist.se>
Wed, 10 Nov 2021 12:01:30 +0000 (13:01 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 10 Nov 2021 12:06:58 +0000 (13:06 +0100)
admin/automerge

index d54f6cb4ac639f5ce0d26a1aece60a10c29c67b1..7d71f29008675986ddba1b345224e9eb29576cb8 100755 (executable)
@@ -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