Alternative creation of TMPDIR in Windows.
Users of portableGit in Windows do not have mktemp. TMPDIR ended up empty and compiler.js was created at /. Good thing is "rm -rf " trap failed with empty arguments and it did not remove everything.
This commit is contained in:
parent
4f40a30718
commit
4b35f04f9a
|
@ -216,7 +216,8 @@ done
|
|||
LIBS="$TOBASE $TOLOAD"
|
||||
|
||||
# Get a unique tempdir and make it get auto removed on exit
|
||||
TMPDIR=`mktemp -d amberc.XXXXXX`
|
||||
TMPDIR=`mktemp -d amberc.XXXXXX 2>>/dev/null` ||\
|
||||
TMPDIR=/tmp/amberc.$$.`date +%s` && mkdir -p $TMPDIR
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue