prism3to4 426 Bytes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
#!/bin/sh

# Script for conversion of old PRISM files (Linux/Solaris)

if [ "$1" = "" ]; then
echo "Usage: prism3to4 <file> [<outfile>]"
exit
fi

# Run using main PRISM script with this class
PRISM_MAINCLASS="parser.Prism3To4"
export PRISM_MAINCLASS

if [ "$2" = "" ]; then
prism "$1"
else
if [ "$2" = "$1" ]; then
( prism "$1" > "$2".new && mv "$2".new "$2" ) || rm "$2".new
else
prism "$1" > "$2"
fi
fi