Commit e2988335 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols

Use mktemp to create a safe temporary directory

Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 04bbd9b5
......@@ -66,7 +66,7 @@ MICROB=`echo ${MICRO} | sed 's/[a-z]//g'`
BRANCH=$2
BUILDDIR="/tmp/mahara/tarballs"
BUILDDIR=`mktemp -d /tmp/mahara.XXXXX`
CURRENTDIR="`pwd`"
SCRIPTDIR=$( readlink -f -- "${0%/*}" )
......@@ -75,10 +75,6 @@ if [ -z "${MAJOR}" ] || [ -z "${MINOR}" ]; then
exit 1
fi
if [ -d ${BUILDDIR} ]; then
rm -rf ${BUILDDIR}
fi
mkdir -p ${BUILDDIR}/mahara
pushd ${BUILDDIR}/mahara
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment