#!/bin/bash # Compile all manual.tex files across sd variants for dir in standard/sd-*/ system/sd-*/; do if [ -f "$dir/manual.tex" ]; then echo "Compiling $dir/manual.tex..." (cd "$dir" && latexmk -pdf manual.tex) fi done echo "Done."