On Cygwin, set TMPDIR to . before using mktemp. Otherwise
one gets an error creating the output file in the /tmp directory.
I haven't tracked this one down, but this should serve as a
workaround.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@481 788f1e2b-df1e-0410-8736-df70ead52e1b
commitf55b54917a3452eda8cc8f4f63889f6cf22d64e5
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateTue 9 Jan 2007, 08:32 (20 years ago)
parent4658014
src/wrappers/tempdir.sh+7
@@ -1,6 +1,13 @@
11# As a security measure refuse to proceed if mktemp is not available.
22pathfind mktemp || { err "Couldn't find 'mktemp'; aborting."; exit 1; }
33
4+# Avoid issues with /tmp directory on Windows/Cygwin
5+cygwin=
6+cygwin=$(uname | sed -ne '/^CYGWIN/p')
7+if [ -n "$cygwin" ]; then
8+ TMPDIR=.
9+fi
10+
411THIS_TEMPDIR=
512THIS_TEMPDIR="$(mktemp -d -t $THIS.XXXXXXXX)" || exit 1
613readonly THIS_TEMPDIR