default_pre_build &&
cd "${SOURCE_DIRECTORY}" &&

apply_patch_dir patches &&

# find all the pdfs, strip the extension and then check if their source is
# also present. If it is, remove the pdf.
if [[ $TTMF_SMALL == y ]]; then
  find "$SOURCE_DIRECTORY" -name "*.pdf" |
    while read p; do
      if [[ -e "${p%pdf}tex" ]]; then
        rm "$p"
      fi
    done
fi &&
# Bad binary being shipped where it does not belong.
# Not -f here, so we notice upstream fix.
rm texmf-dist/doc/luatex/opbible/txs-gen/mod2tex
