blob: 89f2ff733918e888fc79a2f927252ee63e8bd346 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!@BASH@
#
# create a temporary file in a secure way.
#
function maketemp() {
if [ -x /bin/mktemp ]
then
local tempfile=`mktemp /tmp/$1.XXXXXXXX`
else
DATE=`date`
sectmp=`echo $DATE | /usr/bin/md5sum | cut -d- -f1`
local tempfile=/tmp/$1.$sectmp
fi
echo $tempfile
}
|