introductionToProgramming/build.nu
2025-09-22 15:51:40 +02:00

13 lines
No EOL
308 B
Text

ls | where type == "dir" | sort-by name -n | get name | where $it != "common" |
each { |folder|
cd $folder
if not ("common" | path exists) {
ln -s ../common ./common
}
if ("doc.typ" | path exists) {
typst compile doc.typ
}
let zip = ("../" + $folder + ".zip")
rm -f $zip
7z a $zip *
}