[GRASS-SVN] r55066 - grass-addons/grass6/vector/v.out.ply

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 14 16:14:54 PST 2013


Author: hamish
Date: 2013-02-14 16:14:54 -0800 (Thu, 14 Feb 2013)
New Revision: 55066

Modified:
   grass-addons/grass6/vector/v.out.ply/v.out.ply
Log:
quote filename variables

Modified: grass-addons/grass6/vector/v.out.ply/v.out.ply
===================================================================
--- grass-addons/grass6/vector/v.out.ply/v.out.ply	2013-02-14 23:47:53 UTC (rev 55065)
+++ grass-addons/grass6/vector/v.out.ply/v.out.ply	2013-02-15 00:14:54 UTC (rev 55066)
@@ -71,11 +71,11 @@
 if [ -n "$GIS_OPT_FILE" ] ; then
     OUT="$GIS_OPT_FILE"
 else
-    OUT=$GIS_OPT_VECT.ply
+    OUT="$GIS_OPT_VECT".ply
 fi
 
-eval `v.info -t $MAP`
-POINTS=$points
+eval `v.info -t "$MAP"`
+POINTS="$points"
 
 echo "Exporting $POINTS points..."
 
@@ -92,22 +92,24 @@
 property uchar alpha
 element face 0
 property list uchar int vertex_indices
-end_header" > $OUT
+end_header" > "$OUT"
 
 
-v.info -c $MAP | grep GRASSRGB > /dev/null
+v.info -c "$MAP" | grep GRASSRGB > /dev/null
 if [ $? -eq 1 ] ; then
-   v.out.ascii $MAP | tr '|' ' ' | tr ':' ' ' >> $OUT
+   v.out.ascii "$MAP" | tr '|' ' ' | tr ':' ' ' >> "$OUT"
 else
    # g.extension v.out.ascii.db
+   # can the regular v.out.ascii do it now? (that's still really really slow for big maps though)
    if [ ! -x "`which v.out.ascii.db`" ] ; then
       g.message -e "v.out.ascii.db required, please install first with 'g.extension v.out.ascii.db'"
       exit 1
    fi
-   v.out.ascii.db $MAP columns=GRASSRGB,alpha | cut -d'|' -f2-6 | tr '|' ' ' | tr ':' ' ' >> $OUT
+   v.out.ascii.db "$MAP" columns=GRASSRGB,alpha | \
+      cut -d'|' -f2-6 | tr '|' ' ' | tr ':' ' ' >> "$OUT"
 fi
 
 # write cmd history:
-v.support "$MAP" cmdhist="${CMDLINE}"
+v.support "$MAP" cmdhist="$CMDLINE"
 
 exit 0



More information about the grass-commit mailing list