diff options
author | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-12 12:11:25 +0000 |
---|---|---|
committer | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-12 12:11:25 +0000 |
commit | 3ed8fc8784496722af85b6ec2ff5120c75db84dc (patch) | |
tree | c372051cd084ff53a7996a1a54e3c1c54d847b2e /markdown2html | |
parent | 69e23af8e4198dc4e308935855662248a31c6dc2 (diff) | |
download | pandoc-3ed8fc8784496722af85b6ec2ff5120c75db84dc.tar.gz |
Portability fixes and various cleanups in wrapper scripts:
+ Fix the tests at the header of wrappers. which(1) doesn't behave as
expected on some systems. We should only assume that it's pretty widely
available (for example, it's a builtin in csh) and we should only rely on
its exit code by ignoring its output.
+ Replace 'echo -n' with 'printf' as the latter is recommended.
+ In markdown2pdf script, '--suffix' and '--backup' options of mv(1) appear
to be GNU-ism. Apply a workaround.
+ Wrap some long lines to fit in an 80-column screen.
+ Remove spaces at the line ends.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@92 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'markdown2html')
-rw-r--r-- | markdown2html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/markdown2html b/markdown2html index 60dd78a6f..d71e434b4 100644 --- a/markdown2html +++ b/markdown2html @@ -1,7 +1,11 @@ #!/bin/sh -e -# converts markdown to HTML -[ -n "$(which pandoc)" ] || { - echo >&2 "You need 'pandoc' to use this program!" - exit 1 -} +# converts markdown to HTML + +for p in pandoc; do + which $p >/dev/null 2>&1 || { + echo >&2 "You need '$p' to use this program!" + exit 1 + } +done + iconv -t utf-8 $* | pandoc $PANDOC_OPTS | iconv -f utf-8 |