[GRASS-SVN] r39686 - grass/branches/develbranch_6/scripts/i.in.spotvgt

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 6 17:01:34 EST 2009


Author: neteler
Date: 2009-11-06 17:01:34 -0500 (Fri, 06 Nov 2009)
New Revision: 39686

Modified:
   grass/branches/develbranch_6/scripts/i.in.spotvgt/i.in.spotvgt
Log:
fix g.findfile test

Modified: grass/branches/develbranch_6/scripts/i.in.spotvgt/i.in.spotvgt
===================================================================
--- grass/branches/develbranch_6/scripts/i.in.spotvgt/i.in.spotvgt	2009-11-06 22:01:15 UTC (rev 39685)
+++ grass/branches/develbranch_6/scripts/i.in.spotvgt/i.in.spotvgt	2009-11-06 22:01:34 UTC (rev 39686)
@@ -180,11 +180,16 @@
     NAME="$SPOTNAME"
 fi
 
-if [ -n `g.findfile elem=cell file="$NAME" | grep ^file | cut -f2 -d=` ] ; then
-	g.message -e message="<$NAME> already exists. Aborting."
-	exit 1
+
+eval `g.findfile element=cell file=$NAME`
+filename="${fullname}"
+BASE="${name}"
+if [ "$filename" != "" ] ; then
+  g.message -e message="<$NAME> already exists. Aborting."
+  exit 1
 fi
 
+
 # still a ZIP file?  (is this portable?? see the r.in.srtm script for ideas)
 if [ "`file -ib $GIS_OPT_FILE`" = "application/x-zip" ] ; then
   g.message -e message="Please extract $GIS_OPT_FILE before import."



More information about the grass-commit mailing list