r3557@krups: intrigeri | 2005-11-15 14:41:32 +0100
[matthijs/upstream/backupninja.git] / lib / tools.in
1 #!@BASH@
2
3
4 #
5 # create a temporary file in a secure way.
6 #
7 function maketemp() {
8         if [ -x /bin/mktemp ]
9         then
10                 local tempfile=`mktemp /tmp/$1.XXXXXXXX`
11         else
12                 DATE=`date`
13                 sectmp=`echo $DATE | /usr/bin/md5sum | cut -d- -f1`
14                 local tempfile=/tmp/$1.$sectmp
15         fi
16         echo $tempfile
17 }
18
19