Skip to content

Commit

Permalink
[zip] Only build the problem slides if at least one problem has the T…
Browse files Browse the repository at this point in the history
…eX for it
  • Loading branch information
mpsijm committed Dec 21, 2024
1 parent 4a325a3 commit 33ec56e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,13 +1125,20 @@ def run_parsed_arguments(args):
build_type=latex.PdfType.SOLUTION,
web=True,
)
# Only build the problem slides if at least one problem has the TeX for it
if any(
glob(problem.path / "problem_statement", "problem-slide.*.tex")
for problem in problems
):
success &= latex.build_contest_pdf(
contest,
problems,
tmpdir,
statement_language,
build_type=latex.PdfType.PROBLEM_SLIDE,
)
else:
log("No problem has problem-slide.*.tex, skipping problem slides")

outfile = contest + '.zip'
if config.args.kattis:
Expand Down

0 comments on commit 33ec56e

Please sign in to comment.