spacemacs/core/tools/doc-fmt/run.bash

30 lines
975 B
Bash
Raw Normal View History

#!/bin/bash
if ! [ -d "./.git" ]
then
echo "Should be executed from the repo root."
exit 1
fi
#rm #+HTML_HEAD_EXTRA: ... readtheorg.css" /> in the doc.
2016-03-31 02:59:55 +00:00
find ./doc -name "*.org" -type f -exec gsed -i '/#+HTML_HEAD_EXTRA.*readtheorg.css.*/d' {} \;
#rm #+HTML_HEAD_EXTRA: ... readtheorg.css" /> in the layers.
2016-03-31 02:59:55 +00:00
find ./layers -name "*.org" -type f -exec gsed -i '/#+HTML_HEAD_EXTRA.*readtheorg.css.*/d' {} \;
#replace :TOC_4_org: with :TOC_4_gh: in the doc.
2016-03-31 02:59:55 +00:00
find ./doc -name "*.org" -type f -exec gsed -i 's/:TOC_4_org:/:TOC_4_gh:/' {} \;
#replace :TOC_4_org: with :TOC_4_gh: in the layers.
2016-03-31 02:59:55 +00:00
find ./layers -name "*.org" -type f -exec gsed -i 's/:TOC_4_org:/:TOC_4_gh:/' {} \;
#apply toc-org to doc.
2016-04-01 03:58:11 +00:00
find ./doc -name "*.org" -type f -exec emacs -batch -l ./core/tools/doc-fmt/toc-org-apply.el '{}' -f toc-apply \;
#apply toc-org to layers.
2016-04-01 03:58:11 +00:00
find ./layers -name "*.org" -type f -exec emacs -batch -l ./core/tools/doc-fmt/toc-org-apply.el '{}' -f toc-apply \;