[GRASS-SVN] r57203 - in grass/trunk/scripts: db.univar g.extension i.in.spotvgt i.spectral r.in.aster

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 18 01:19:07 PDT 2013


Author: annakrat
Date: 2013-07-18 01:19:07 -0700 (Thu, 18 Jul 2013)
New Revision: 57203

Modified:
   grass/trunk/scripts/db.univar/db.univar.py
   grass/trunk/scripts/g.extension/g.extension.py
   grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py
   grass/trunk/scripts/i.spectral/i.spectral.py
   grass/trunk/scripts/r.in.aster/r.in.aster.py
Log:
add missing parameters for find_program

Modified: grass/trunk/scripts/db.univar/db.univar.py
===================================================================
--- grass/trunk/scripts/db.univar/db.univar.py	2013-07-17 17:25:24 UTC (rev 57202)
+++ grass/trunk/scripts/db.univar/db.univar.py	2013-07-18 08:19:07 UTC (rev 57203)
@@ -69,7 +69,7 @@
     inf = file(infile, 'r')
     outf = file(outfile, 'w')
 
-    if grass.find_program('sort'):
+    if grass.find_program('sort', '--help'):
         grass.run_command('sort', flags = 'n', stdin = inf, stdout = outf)
     else:
         # FIXME: we need a large-file sorting function

Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py	2013-07-17 17:25:24 UTC (rev 57202)
+++ grass/trunk/scripts/g.extension/g.extension.py	2013-07-18 08:19:07 UTC (rev 57203)
@@ -139,7 +139,7 @@
 # check requirements
 def check_progs():
     for prog in ('svn', 'make', 'gcc'):
-        if not grass.find_program(prog):
+        if not grass.find_program(prog, '--help'):
             grass.fatal(_("'%s' required. Please install '%s' first.") % (prog, prog))
 
 # expand prefix to class name

Modified: grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py
===================================================================
--- grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py	2013-07-17 17:25:24 UTC (rev 57202)
+++ grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py	2013-07-18 08:19:07 UTC (rev 57203)
@@ -112,7 +112,7 @@
     also = flags['a']
 
     #### check for gdalinfo (just to check if installation is complete)
-    if not grass.find_program('gdalinfo'):
+    if not grass.find_program('gdalinfo', '--help'):
 	grass.fatal(_("'gdalinfo' not found, install GDAL tools first (http://www.gdal.org)"))
 
     pid = str(os.getpid())

Modified: grass/trunk/scripts/i.spectral/i.spectral.py
===================================================================
--- grass/trunk/scripts/i.spectral/i.spectral.py	2013-07-17 17:25:24 UTC (rev 57202)
+++ grass/trunk/scripts/i.spectral/i.spectral.py	2013-07-18 08:19:07 UTC (rev 57203)
@@ -197,7 +197,7 @@
         grass.fatal(_("group= and raster= are mutually exclusive"))
 
     # check if gnuplot is present
-    if gnuplot and not grass.find_program('gnuplot'):
+    if gnuplot and not grass.find_program('gnuplot', '-V'):
         grass.fatal(_("gnuplot required, please install first"))
 
     # get data from group listing and set the x-axis labels

Modified: grass/trunk/scripts/r.in.aster/r.in.aster.py
===================================================================
--- grass/trunk/scripts/r.in.aster/r.in.aster.py	2013-07-17 17:25:24 UTC (rev 57202)
+++ grass/trunk/scripts/r.in.aster/r.in.aster.py	2013-07-18 08:19:07 UTC (rev 57203)
@@ -98,7 +98,7 @@
     band = options['band']
 
     #check whether gdalwarp is in path and executable
-    if not grass.find_program('gdalwarp'):
+    if not grass.find_program('gdalwarp', '--help'):
         grass.fatal(_("gdalwarp is not in the path and executable"))
 
     #create temporary file to hold gdalwarp output before importing to GRASS



More information about the grass-commit mailing list