why/gwhy-2.26.patch
Jerry James 6fc19ee63f New upstream release (fixes FTBFS: bz 715902).
Remove unnecessary spec file elements (BuildRoot, etc.).
Update approach to filtering provides and requires.
Add has_pvs analogously to has_coq, and simplify macro usage.
Add (X)Emacs support packages.
New subpackage for the jessie plugin to avoid unowned directories and permit a
direct dependency on frama-c.
Prepare for the eventual availability of APRON.
2011-07-11 15:40:19 -06:00

53 lines
1.2 KiB
Diff

--- bin/gwhy.sh.orig 2011-03-02 01:27:41.000000000 -0700
+++ bin/gwhy.sh 2011-07-07 15:41:07.232455718 -0600
@@ -1,11 +1,17 @@
#!/bin/sh
-case $1 in
+if ! test $1; then
+file=`zenity --file-selection --title="Select the file you want to open with gwhy"`;
+else
+file=$1
+fi
+
+case $file in
*.java)
- b=`basename $1 .java`
- krakatoa $1 || exit 1
+ b=`basename $file .java`
+ krakatoa $file || exit 1
echo "krakatoa on $b.java done"
- d=`dirname $1`
+ d=`dirname $file`
echo "cd $d"
cd $d
jessie -locs $b.jloc -why-opt -split-user-conj $b.jc || exit 2
@@ -13,20 +19,23 @@
make -f $b.makefile gui
;;
*.c)
- b=`basename $1 .c`
- caduceus -why-opt -split-user-conj $1 || exit 1
+ b=`basename $file .c`
+ caduceus -why-opt -split-user-conj $b.c || exit 1
make -f $b.makefile gui
;;
*.jc)
- b=`basename $1 .jc`
+ b=`basename $file .jc`
jessie -why-opt -split-user-conj $b.jc || exit 1
make -f $b.makefile gui
;;
*.mlw|*.why)
- gwhy-bin -split-user-conj $1
+ gwhy-bin -split-user-conj $file
+ ;;
+ ?*)
+ echo "$file does not have file type extension recognized by gwhy"
;;
*)
- echo "don't know what to do with $1"
+ echo "gwhy needs the name of a file to inspect in order to run"
esac