30 lines
605 B
Makefile
30 lines
605 B
Makefile
alias w := watch
|
|
alias c := compile
|
|
|
|
alias nw := nix-watch
|
|
alias nb := nix-build
|
|
alias nd := nix-develop
|
|
|
|
file := "src/main.typ"
|
|
out := `cat doc.toml | tomlq '.doctype + (.worknumber | tostring) + "_" + (.authors[0].name | split(" ")[0]) + "_" + (.authors[0].edu + "-" + .authors[0].group) + "_" + .subject + ".pdf"'`
|
|
|
|
[group('typst')]
|
|
watch:
|
|
typst w {{file}} {{out}}
|
|
[group('typst')]
|
|
compile:
|
|
typst c {{file}} {{out}}
|
|
|
|
copy-done:
|
|
cp main.pdf ../{{out}}
|
|
|
|
[group('nix')]
|
|
nix-develop:
|
|
nix develop .
|
|
[group('nix')]
|
|
nix-watch:
|
|
nix run .#watch
|
|
[group('nix')]
|
|
nix-build:
|
|
nix run .#build
|