You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
390 B
17 lines
390 B
#!/bin/sh
|
|
|
|
if [ "$1" = "" ]; then
|
|
echo "Usage: prism3to4 <file> [<outfile>]"
|
|
exit
|
|
fi
|
|
|
|
if [ "$2" = "" ]; then
|
|
java -cp ~/prism-parser/classes parser.Prism3To4 "$1"
|
|
else
|
|
if [ "$2" = "$1" ]; then
|
|
( java -cp ~/prism-parser/classes parser.Prism3To4 "$1" > "$2".new && mv "$2".new "$2" ) || rm "$2".new
|
|
else
|
|
java -cp ~/prism-parser/classes parser.Prism3To4 "$1" > "$2"
|
|
fi
|
|
fi
|
|
|