51 lines
1.1 KiB
Diff
51 lines
1.1 KiB
Diff
--- bin/gwhy.sh 2008-07-28 08:03:03.000000000 -0400
|
|
+++ bin/gwhy.sh 2008-08-01 22:56:01.000000000 -0400
|
|
@@ -1,27 +1,40 @@
|
|
#!/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
|
|
+
|
|
+d=`dirname $file`
|
|
+cd $d
|
|
+
|
|
+case $file in
|
|
*.java)
|
|
- b=`basename $1 .java`
|
|
- krakatoa $1 || exit 1
|
|
+ b=`basename $file .java`
|
|
+ krakatoa $b.java || exit 1
|
|
jessie -locs $b.jloc -why-opt -split-user-conj $b.jc || exit 2
|
|
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
|
|
make -f $b.makefile gui
|
|
;;
|
|
*.jc)
|
|
- b=`basename $1 .jc`
|
|
+ b=`basename $file .jc`
|
|
jessie $b.jc || exit 1
|
|
make -f $b.makefile gui
|
|
;;
|
|
*.mlw|*.why)
|
|
- gwhy-bin -split-user-conj $1
|
|
+ b=`basename $file`
|
|
+ gwhy-bin -split-user-conj $b
|
|
+ ;;
|
|
+ ?*)
|
|
+ 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
|
|
|
|
|