Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@631 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
b831de7
commit 9565271
Showing
2 changed files
with
63 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
LOCAL=${PWD} | ||
cd `dirname $0` | ||
cd ../.. | ||
SLPS=${PWD} | ||
cd ${LOCAL} | ||
|
||
if [ $# -eq 1 ]; then | ||
OUTPUT=/dev/stdout | ||
elif [ $# -ne 2 ]; then | ||
echo "This tool transforms Transformational BGF documents to includable TeX files." | ||
echo "Usage: xbgf2tex <input-xbgf-document> [<output-tex>]" | ||
echo "When output file is not specified, stdout is used." | ||
exit 1 | ||
else | ||
OUTPUT=$2 | ||
fi | ||
if [ ! -r $1 ]; then | ||
echo "Oops: $1 not found or not readable." | ||
exit 1 | ||
fi | ||
|
||
echo '\\begin{graybox}' > ${OUTPUT} | ||
echo '\\begin{lstlisting}[language=pp]' >> ${OUTPUT} | ||
xsltproc ${SLPS}/shared/xsl/xbgf2xbnf.xslt $1 >> ${OUTPUT} | ||
echo '\\end{lstlisting}' >> ${OUTPUT} | ||
echo '\\end{graybox}' >> ${OUTPUT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters