Commit ce58148f authored by tuncer's avatar tuncer
Browse files assign first and use later

1. Assign the var and export afterwards.

2. Use mktemp instead of home-grown solution. The mktemp flags we use
   are supported on FreeBSD, Solaris, OpenBSD, and Linux.
parent 713cf222
......@@ -54,9 +54,8 @@ GZIP_PROGRAM="${GZIP_PROGRAM:-gzip}"
# Try to respect $TMPDIR.
[ -"$TMPDIR"- = -""- ] &&
export TMPDIR=/tmp/cabal-$(echo $(od -XN4 -An /dev/random)) && mkdir $TMPDIR
TMPDIR=$(mktemp -d -p /tmp -t cabal-XXXXXXX)
export TMPDIR
# Check for a C compiler, using user-set $CC, if any, first.
for c in $CC gcc clang cc icc; do
Supports Markdown
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