diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-12 15:41:55 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-12 15:41:55 +0000 |
commit | 1fdafb520475ee0265fddabcfef9d27279faa342 (patch) | |
tree | 564066c24cc6c7fea21344117b40572eb7478dc5 /cabalize | |
parent | 2d653dc1daee0ac95a2bb3e5b1a0be99351251ac (diff) | |
download | pandoc-1fdafb520475ee0265fddabcfef9d27279faa342.tar.gz |
Extract version number from src/Main.hs in cabalize and Makefile.
The authoritative version number is now in src/Main.hs, with no
duplication. (This seems a better solution than building Main.hs
from a template.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@182 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'cabalize')
-rwxr-xr-x | cabalize | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -29,6 +29,8 @@ case "$ghc_version" in esac BUILD_DEPENDS=$(echo $BUILD_DEPENDS | sed -e 's# #, #g') +PANDOC_VERSION=$(sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' src/Main.hs) + # Handle 'Hs-Source-Dir' option name which was deprecated in Cabal > 1.1.3. HS_SOURCE_DIRS='Hs-Source-Dirs' cabal_version=$(ghc-pkg -l | sed -ne 's/.*[Cc]abal-\([^,]*\).*/\1/p') @@ -38,4 +40,5 @@ fi sed -e "s#@HCFLAGS@#$HCFLAGS#g" \ -e "s#@BUILD_DEPENDS@#$BUILD_DEPENDS#g" \ - -e "s#@HS_SOURCE_DIRS@#$HS_SOURCE_DIRS#g" + -e "s#@HS_SOURCE_DIRS@#$HS_SOURCE_DIRS#g" \ + -e "s#@VERSION@#$PANDOC_VERSION#g" |