Last active
May 28, 2016 00:25
-
-
Save mattbailey/31a432b65dee7c13b286d4fee7ddd4a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # use as pre-commit git hook | |
| find manuscript -name "*.adoc" | \ | |
| xargs -P 3 -I {} \ | |
| asciidoctor-pdf \ | |
| -d book \ | |
| -o ./{}.pdf \ | |
| -a pdf-fontsdir=misc/fonts \ | |
| -a pdf-style=misc/manning-theme.yml \ | |
| {} | |
| for file in manuscript/*.adoc; do | |
| chapter=`basename $file .adoc` | |
| mv manuscript/${chapter}.adoc.pdf manuscript/${chapter}.pdf | |
| git add manuscript/${chapter}.pdf | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment