Skip to content

Commit 6721f77

Browse files
committed
add check for chapter labels in intro-HPC/title.txt
1 parent c15529d commit 6721f77

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

run-pre-checks.sh

+15
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ if [[ $result ]]; then
1717
ec=1
1818
fi
1919

20+
# make sure all chapter in HPC intro have a reference in title.tex
21+
chapter_check_fails=0;
22+
for chapter in $(grep "\label{ch:" intro-HPC/ch*tex | cut -f2- -d: | cut -c7-);
23+
do
24+
cnt=$(grep $chapter intro-HPC/title.tex|wc -l);
25+
if [[ $cnt -ne 1 ]]; then
26+
echo $chapter;
27+
((chapter_check_fails+=1));
28+
fi;
29+
done
30+
if [[ $chapter_check_fails -ne 0 ]]; then
31+
echo "Chapter label for one or more chapters not found in title.tex (see above)!"
32+
ec=$chapter_check_fails
33+
fi
34+
2035
if [[ "$ec" -eq 0 ]]; then
2136
echo "All checks passed"
2237
fi

0 commit comments

Comments
 (0)