فهرست منبع

add missing parameters for find_program

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57203 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 سال پیش
والد
کامیت
e323e4b080

+ 1 - 1
scripts/db.univar/db.univar.py

@@ -69,7 +69,7 @@ def sortfile(infile, outfile):
     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

+ 1 - 1
scripts/g.extension/g.extension.py

@@ -139,7 +139,7 @@ PROXIES = {}
 # 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

+ 1 - 1
scripts/i.in.spotvgt/i.in.spotvgt.py

@@ -112,7 +112,7 @@ def main():
     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())

+ 1 - 1
scripts/i.spectral/i.spectral.py

@@ -197,7 +197,7 @@ def main():
         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

+ 1 - 1
scripts/r.in.aster/r.in.aster.py

@@ -98,7 +98,7 @@ def main():
     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