harmony 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+29/−1 lines, 2 files
Files
- harmony.cabal +2/−1
- make_bnfc.sh +27/−0
harmony.cabal view
@@ -6,7 +6,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.0.1+version: 0.1.0.2 synopsis: A web service specification compiler that generates implementation and tests. @@ -33,6 +33,7 @@ , templates/client/python/test.tpl extra-source-files: README.md+ , make_bnfc.sh cabal-version: >= 1.18
+ make_bnfc.sh view
@@ -0,0 +1,27 @@+#!/bin/sh++# Compiles the language specification if it is needed, removing all unnecessary files and appending+# a pragma to tell HLint to ignore those files.++makeBnfc() {+ bnfc -d language-spec/Language.cf; + rm Language/Test.hs+ rm Language/Print.hs+ mv Language src+}++printf "%s" "Checking status of language specification..."+if [ ! -d 'src/Language' ]; then+ printf " %s\n" "Language specification needs to be compiled"+ makeBnfc;+ exit 0+fi++if [ 'language-spec/Language.cf' -nt src/Language/ ]; then + printf " %s\n" "Language specification needs to be re-compiled";+ rm -rf src/Language;+ makeBnfc;+ exit 0+fi++printf "%s\n" " OK"