aboutsummaryrefslogtreecommitdiffstats
path: root/dist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dist.sh')
-rwxr-xr-xdist.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/dist.sh b/dist.sh
index e2ecd8e19..6e10cae2f 100755
--- a/dist.sh
+++ b/dist.sh
@@ -12,7 +12,13 @@ PREFIX=`basename $FNAME | sed -e 's/\.tar.*$//'`
OUT=""
while true ; do
- OUT="/tmp/files-`strings -7 /dev/urandom | head -1 | sed -e 's/[^[:alnum:]]//g'`"
+ _mktemp=`which mktemp`
+ if [ F"$_mktemp" != "F" ] ; then
+ OUT=`$_mktemp /tmp/files-XXXXXXXX`
+ break
+ else
+ OUT="/tmp/files-`strings -7 /dev/urandom | head -1 | sed -e 's/[^[:alnum:]]//g'`"
+ fi
if [ ! -f "$OUT" ] ; then break ; fi
done