diff options
author | LAN-TW <lantw44@gmail.com> | 2013-12-05 12:29:53 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-12-05 12:29:53 +0800 |
commit | 0d2b333ddab40fc08c02503a1210d6685e0ad9bc (patch) | |
tree | 3330e6a647fa6f5a5c7e122f1581df1b56d6043e | |
parent | 55bbfc2533f67e20cb60b0a47362740cddce7919 (diff) | |
download | configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar.gz configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar.bz2 configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar.lz configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar.xz configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.tar.zst configfile-0d2b333ddab40fc08c02503a1210d6685e0ad9bc.zip |
cgit: 加入 about-formatting.shcgit-20131205
-rwxr-xr-x | cgit/about-formatting.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cgit/about-formatting.sh b/cgit/about-formatting.sh new file mode 100755 index 0000000..4d7ffcc --- /dev/null +++ b/cgit/about-formatting.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Markdown support requires perl. +# RestructuredText support requires python and docutils. +# Man page support requires groff. + +cd "$(dirname $0)/html-converters/" +case "$(echo "$1" | tr '[:upper:]' '[:lower:]')" in + *.md|*.mkd) exec ./md2html; ;; + *.rst) exec ./rst2html; ;; + *.[1-9]) exec ./man2html; ;; + *.htm|*.html) exec cat; ;; + *.txt|*) exec ./txt2html; ;; +esac |