From cc26d7cfed5387b54ac9ee73c3bd26914d4e96d3 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 13 Dec 2006 17:28:26 +0000 Subject: [PATCH] In cabalize, add '.exe' extension to executables if we're on Windows/Cygwin. git-svn-id: https://pandoc.googlecode.com/svn/trunk@190 788f1e2b-df1e-0410-8736-df70ead52e1b --- cabalize | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cabalize b/cabalize index 407336c9b..f2223ed92 100755 --- a/cabalize +++ b/cabalize @@ -38,7 +38,11 @@ if printf "$cabal_version\n1.1.3" | sort | tail -n 1 | grep -q '1\.1\.3'; then HS_SOURCE_DIRS='Hs-Source-Dir' fi +# If running Windows/Cygwin, add .exe to executable name +EXTENSION=$(uname | tr 'A-Z' 'a-z' | sed -ne 's/^cygwin.*$/\.exe/p') + sed -e "s#@HCFLAGS@#$HCFLAGS#g" \ -e "s#@BUILD_DEPENDS@#$BUILD_DEPENDS#g" \ -e "s#@HS_SOURCE_DIRS@#$HS_SOURCE_DIRS#g" \ - -e "s#@VERSION@#$PANDOC_VERSION#g" + -e "s#@VERSION@#$PANDOC_VERSION#g" \ + -e "s#^\(Executable:[[:space:]]*pandoc\)#\1$EXTENSION#g"