cws/build.sc
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 01 Dec 2022 12:51:49 +0000
changeset 899 569a3adb6e01
parent 889 00c1c3408c93
child 919 53f08d873e09
permissions -rwxr-xr-x
updated

#!/usr/bin/env amm

val files = Seq("cw01.tex",
	         "cw02.tex",
	         "cw03.tex",
	         "cw04.tex",
	         "cw05.tex")

val pdf_files = files.map(s => s.stripSuffix("tex") ++ "pdf")


@main
def make() = {
  for (f <- files) {
    println(s"Processing $f ...")
    os.proc("xelatex", f).call(stdout = os.Inherit, stdin = os.Inherit)
    os.proc("xelatex", f).call(stdout = os.Inherit, stdin = os.Inherit)
  }
}


@main
def hg() = {
  println(os.proc("hg", "commit", "-m texupdate", files ++ pdf_files).call())
  println(os.proc("hg", "push").call())
}