Browse Source

Added some useful scripts to etc/scripts.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@778 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 18 years ago
parent
commit
b0f6994f55
  1. 1
      prism/Makefile
  2. 6
      prism/etc/README
  3. 8
      prism/etc/scripts/prism2html
  4. 8
      prism/etc/scripts/prism2latex
  5. 17
      prism/etc/scripts/prism3to4

1
prism/Makefile

@ -394,6 +394,7 @@ dist_tidy:
@find examples -type f -name 'auto' -exec chmod 755 {} \;
@find bin -type f -exec chmod 755 {} \;
@find src/bin -type f -exec chmod 755 {} \;
@find etc/scripts -type f -exec chmod 755 {} \;
binary:
@echo Generating jar file...

6
prism/etc/README

@ -2,6 +2,12 @@ This directory contains the following.
* PRISM icons for shortcuts/etc. - p*.png, p*.ico
* Various useful scripts in scripts/
- prism2html - converts PRISM models/properties to HTML
- prism2latex - converts PRISM models/properties to LaTex
- prism3to4 - fixes some common problems in old (3.x and earlier) PRISM models
(these scripts run on Linux/Unix/OS X and require prism to be in your path)
* MIME type and syntax highlighting config for PRISM (under Gnome) - Overrides.xml, prism.lang
* Syntax highlighting pattern for PRISM in NEdit - prism.pats

8
prism/etc/scripts/prism2html

@ -0,0 +1,8 @@
#!/bin/sh
# Startup script for PRISM to HTML converter (Linux/Solaris)
# Launch using main PRISM script
PRISM_MAINCLASS="parser.PrismSyntaxHighlighter html"
export PRISM_MAINCLASS
prism "$@"

8
prism/etc/scripts/prism2latex

@ -0,0 +1,8 @@
#!/bin/sh
# Startup script for PRISM to LaTeX converter (Linux/Solaris)
# Launch using main PRISM script
PRISM_MAINCLASS="parser.PrismSyntaxHighlighter latex"
export PRISM_MAINCLASS
prism "$@"

17
prism/etc/scripts/prism3to4

@ -0,0 +1,17 @@
#!/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
Loading…
Cancel
Save