928
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 |
|
943
|
3 |
val files = Seq("slides01.tex",
|
|
4 |
"slides02.tex",
|
|
5 |
"slides03.tex",
|
|
6 |
"slides04.tex",
|
|
7 |
"slides05.tex",
|
|
8 |
"slides06.tex",
|
|
9 |
"slides07.tex",
|
|
10 |
"slides08.tex",
|
|
11 |
"slides09.tex",
|
|
12 |
"slides10.tex")
|
928
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
val pdf_files = files.map(s => s.stripSuffix("tex") ++ "pdf")
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
16 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
17 |
@main
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
18 |
def make() = {
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
19 |
for (f <- files) {
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
20 |
println(s"Processing $f ...")
|
943
|
21 |
os.proc("xelatex", f).call(stdout = os.Inherit, stdin = os.Inherit)
|
928
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
22 |
}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
23 |
}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
24 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
25 |
@main
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
26 |
def hg() = {
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
27 |
println(os.proc("hg", "commit", "-m texupdate", files ++ pdf_files).call())
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
28 |
println(os.proc("hg", "push").call())
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
29 |
}
|