equal
deleted
inserted
replaced
1 #!/bin/bash |
|
2 set -euo pipefail |
|
3 |
|
4 # Prepare pandoc filters |
|
5 if [ -d pandocfilters/.git ]; then |
|
6 (cd pandocfilters && git remote update && git merge --ff-only) |
|
7 else |
|
8 git clone https://github.com/Lothiraldan/pandocfilters.git |
|
9 fi |
|
10 |
|
11 pip2 install pandocfilters |
|
12 pip2 install pygraphviz |
|
13 pip2 install panflute |
|
14 pip2 install hg+https://bitbucket.org/octobus/mercurial_docgraph |
|
15 pip2 install hg-evolve |
|
16 |
|
17 mkdir -p graphs output |
|
18 |
|
19 CMD_NOT_FOUND=0 |
|
20 check_command() { |
|
21 cmd=$1 |
|
22 if ! which "$cmd" >/dev/null 2>&1; then |
|
23 echo "Error: command '$cmd' not found in \$PATH" |
|
24 echo "Please install '$cmd'" |
|
25 CMD_NOT_FOUND=1 |
|
26 else |
|
27 echo "$cmd command was found" |
|
28 fi |
|
29 } |
|
30 |
|
31 check_command pandoc |
|
32 check_command aha |
|
33 |
|
34 if [ "$CMD_NOT_FOUND" -ne "0" ]; then |
|
35 exit 1 |
|
36 fi |
|
37 |
|
38 # Prepare directory for repositories generated by the training.t file |
|
39 mkdir -p base-repos |
|
40 |
|
41 rm -Rf base-repos/* |
|