-if [ ! -r standard.iso ]
- then echo "There is no standard.iso here.
-Are you sure you run this script from the coccinelle directory ?
+
+# 14 Aug 2009 Try directory we were executed from
+
+if [ "$1" ] ; then
+ DIR=$1
+else
+ DIR=`pwd`
+fi
+
+if [ ! -r $DIR/standard.iso ]
+then
+ echo "standard.iso not found in '$DIR' trying `dirname $0`"
+ DIR=`dirname $0`
+fi
+
+if [ ! -r $DIR/standard.iso ]
+ then echo "standard.iso not found in '$DIR'.
+ Give the coccinelle directory as the first argument.