|
|
2858195 |
# Copyright 2018 Red Hat, Inc.
|
|
|
2858195 |
# Author: Václav Doležal <vdolezal@redhat.com>
|
|
|
2858195 |
# THIS FILE IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
|
|
2858195 |
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
|
|
2858195 |
#
|
|
|
2858195 |
# Permission is hereby granted to use or copy this program
|
|
|
2858195 |
# for any purpose, provided the above notices are retained on all copies.
|
|
|
2858195 |
# Permission to modify the code and to distribute modified code is granted,
|
|
|
2858195 |
# provided the above notices are retained, and a notice that the code was
|
|
|
2858195 |
# modified is included with the above copyright notice.
|
|
|
f358792 |
for file in "$@"; do
|
|
|
f358792 |
pandoc -f markdown_github "${file}" -t asciidoc -o "${file%.md}.tmp.adoc" ||exit $?
|
|
|
f358792 |
touch -r "${file}" "${file%.md}.tmp.adoc" ||exit $?
|
|
|
f358792 |
TZ=UTC asciidoc -o "${file%.md}.html" -a footer-style=none -a toc2 -a source-highlighter=highlight "${file%.md}.tmp.adoc" ||exit $?
|
|
|
f358792 |
rm "${file%.md}.tmp.adoc"
|
|
|
f358792 |
done
|