From f55b54917a3452eda8cc8f4f63889f6cf22d64e5 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 9 Jan 2007 08:32:59 +0000 Subject: 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 --- src/wrappers/tempdir.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/wrappers/tempdir.sh') diff --git a/src/wrappers/tempdir.sh b/src/wrappers/tempdir.sh index 8d2754b1c..4426b73a7 100644 --- a/src/wrappers/tempdir.sh +++ b/src/wrappers/tempdir.sh @@ -1,6 +1,13 @@ # As a security measure refuse to proceed if mktemp is not available. pathfind mktemp || { err "Couldn't find 'mktemp'; aborting."; exit 1; } +# Avoid issues with /tmp directory on Windows/Cygwin +cygwin= +cygwin=$(uname | sed -ne '/^CYGWIN/p') +if [ -n "$cygwin" ]; then + TMPDIR=. +fi + THIS_TEMPDIR= THIS_TEMPDIR="$(mktemp -d -t $THIS.XXXXXXXX)" || exit 1 readonly THIS_TEMPDIR -- cgit v1.2.3