]> git.immae.eu Git - github/fretlink/edi-parser.git/blob - scripts/scaffolder.sh
Release code as open source
[github/fretlink/edi-parser.git] / scripts / scaffolder.sh
1 #!/usr/bin/env bash
2
3 HERE="$(dirname "$0")"
4
5 REVISION="D96A"
6 if [ -n "$1" ]
7 then
8 REVISION=$1
9 shift 1
10 fi
11
12 function specification {
13 stack exec edi-parser-scaffolder -- \
14 scaffold --revision "$REVISION" \
15 --src "$HERE/../src" \
16 --specification "$HERE/../specification"
17 }
18
19 function missing {
20 echo "$1 is missing. Aborting."
21 exit 1
22 }
23
24 function checkRequirements {
25 command -v stylish-haskell > /dev/null || missing "stylish-haskell"
26 }
27
28 checkRequirements
29 specification