Don't rebuild if we don't need to

This commit is contained in:
Nathan McCarty 2024-12-20 08:43:08 +00:00
parent b1ee31c58f
commit 7e3aa68942

View file

@ -56,10 +56,13 @@ sub MAIN() {
paths("src", :file(-> $a {$a.ends-with(".idr") || $a.ends-with(".md")}))
.map: *.IO.relative("src/".IO);
# Do a pack clean build so we can find the ttms
exit -1 unless run <pack clean>;
exit -1 unless run <pack build>;
# Clean if there is more than one ttc folder, easiest way to locate the
# correct one
if "build/ttc".IO.dir.elems > 1 {
# Do a pack clean build so we can find the ttms
exit -1 unless run <pack clean>;
exit -1 unless run <pack build>;
}
# find our ttc folder
$build-path = "build/ttc/".IO.dir[0];