[GRASS-SVN] r41371 - grass/branches/releasebranch_6_4/scripts/m.proj

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 9 01:52:20 EST 2010


Author: hamish
Date: 2010-03-09 01:52:20 -0500 (Tue, 09 Mar 2010)
New Revision: 41371

Modified:
   grass/branches/releasebranch_6_4/scripts/m.proj/m.proj
Log:
OSX compatibility (trac #991), fix typos in TEMPFILE backport (trac #890)

Modified: grass/branches/releasebranch_6_4/scripts/m.proj/m.proj
===================================================================
--- grass/branches/releasebranch_6_4/scripts/m.proj/m.proj	2010-03-09 06:42:47 UTC (rev 41370)
+++ grass/branches/releasebranch_6_4/scripts/m.proj/m.proj	2010-03-09 06:52:20 UTC (rev 41371)
@@ -154,7 +154,6 @@
 fi
 if [ -z "$IN_PROJ" ] ; then
    g.message -e "Missing input projection parameters."
-   rm -f "$TEMPFILE"
    exit 1
 fi
 
@@ -193,16 +192,16 @@
       read REPLY
       EXITCODE=$?
       if [ -n "$REPLY" ] ; then
-	 echo "$REPLY" >> "$TMPFILE"
+	 echo "$REPLY" >> "$TEMPFILE"
       fi
    done
 
    # make sure we have at least one line of data
-   if [ "`wc -l "$TMPFILE" | cut -f1 -d' '`" -eq 0 ] ; then
+   if [ `cat "$TEMPFILE" | wc -l` -eq 0 ] ; then
       g.message -e "ERROR reading data from stdin"
       exit 1
    fi
-   infile="$TMPFILE"
+   infile="$TEMPFILE"
 else
    infile="$GIS_OPT_INPUT"
 fi



More information about the grass-commit mailing list