Revision 840,
509 bytes
checked in by yasumichi, 14 years ago
(diff) |
first import
|
Rev | Line | |
---|
[840] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | CSS= |
---|
| 4 | TARGET= |
---|
| 5 | STYLE=@XSLDIR@/local.xsl |
---|
| 6 | OPTIONS="--stringparam chunker.output.indent yes" |
---|
| 7 | |
---|
| 8 | if [ -z "$*" ]; then |
---|
| 9 | echo "Usage: `basename $0` hoge.xml" |
---|
| 10 | exit 1 |
---|
| 11 | fi |
---|
| 12 | |
---|
| 13 | while [ ! -z "$*" ]; do |
---|
| 14 | case $1 in |
---|
| 15 | --clean) |
---|
| 16 | rm *.html |
---|
| 17 | ;; |
---|
| 18 | --css) |
---|
| 19 | shift |
---|
| 20 | CSS=$1 |
---|
| 21 | ;; |
---|
| 22 | *) |
---|
| 23 | TARGET=$1 |
---|
| 24 | ;; |
---|
| 25 | esac |
---|
| 26 | shift |
---|
| 27 | done |
---|
| 28 | |
---|
| 29 | if [ -z $TARGET ]; then |
---|
| 30 | echo "No target" |
---|
| 31 | exit 1 |
---|
| 32 | fi |
---|
| 33 | |
---|
| 34 | if [ -n $CSS ]; then |
---|
| 35 | OPTIONS="${OPTIONS} --stringparam html.stylesheet ${CSS}" |
---|
| 36 | fi |
---|
| 37 | |
---|
| 38 | xsltproc ${OPTIONS} ${STYLE} ${TARGET} |
---|
| 39 | |
---|
| 40 | # vi:syntax=sh |
---|
Note: See
TracBrowser
for help on using the repository browser.