From f2c6fa87ac708313ab28d50dfde695e436d4cafc Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 30 Apr 2008 08:47:03 +0000 Subject: [PATCH] Fixed prism3to4 script. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@780 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/prism3to4 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/prism/etc/scripts/prism3to4 b/prism/etc/scripts/prism3to4 index 1d56b8e5..d81661bb 100755 --- a/prism/etc/scripts/prism3to4 +++ b/prism/etc/scripts/prism3to4 @@ -1,17 +1,23 @@ #!/bin/sh +# Script for conversion of old PRISM files (Linux/Solaris) + if [ "$1" = "" ]; then echo "Usage: prism3to4 []" exit fi +# Run using main PRISM script with this class +PRISM_MAINCLASS="parser.Prism3To4" +export PRISM_MAINCLASS + if [ "$2" = "" ]; then - java -cp ~/prism-parser/classes parser.Prism3To4 "$1" + prism "$1" else if [ "$2" = "$1" ]; then - ( java -cp ~/prism-parser/classes parser.Prism3To4 "$1" > "$2".new && mv "$2".new "$2" ) || rm "$2".new + ( prism "$1" > "$2".new && mv "$2".new "$2" ) || rm "$2".new else - java -cp ~/prism-parser/classes parser.Prism3To4 "$1" > "$2" + prism "$1" > "$2" fi fi