836
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
1 |
#!/usr/bin/env amm
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
|
889
|
3 |
val files = Seq("cw01.tex",
|
919
|
4 |
"cw02.tex",
|
|
5 |
"cw03.tex",
|
|
6 |
"cw04.tex",
|
|
7 |
"cw05.tex")
|
836
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
|
889
|
9 |
val pdf_files = files.map(s => s.stripSuffix("tex") ++ "pdf")
|
836
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
10 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
12 |
@main
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
def make() = {
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
for (f <- files) {
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
println(s"Processing $f ...")
|
919
|
16 |
os.proc("lualatex", f).call(stdout = os.Inherit, stdin = os.Inherit)
|
|
17 |
os.proc("lualatex", f).call(stdout = os.Inherit, stdin = os.Inherit)
|
836
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
18 |
}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
19 |
}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
20 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
21 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
22 |
@main
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
23 |
def hg() = {
|
889
|
24 |
println(os.proc("hg", "commit", "-m texupdate", files ++ pdf_files).call())
|
|
25 |
println(os.proc("hg", "push").call())
|
836
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
26 |
}
|