[GRASS-SVN] r53122 - grass-addons/grass6/raster/r.connectivity.network

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 7 04:14:24 PDT 2012


Author: sbl
Date: 2012-09-07 04:14:24 -0700 (Fri, 07 Sep 2012)
New Revision: 53122

Modified:
   grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network
Log:
Fix 'sed -i' not working on Windows

Modified: grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network
===================================================================
--- grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network	2012-09-07 09:46:21 UTC (rev 53121)
+++ grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network	2012-09-07 11:14:24 UTC (rev 53122)
@@ -1435,15 +1435,14 @@
 
 #Suppress parallel processing if not requested
 if [ $CORES -le 1 ] ; then
-	sed -i "s/mclapply/lapply/g" ${FOLDER}/network.r
-
-	sed -i "s/library(codetools)//g" ${FOLDER}/network.r
-	sed -i "s/library(multicore)//g" ${FOLDER}/network.r
-	sed -i "s/library(iterators)//g" ${FOLDER}/network.r
-	sed -i "s/library(foreach)//g" ${FOLDER}/network.r
-	sed -i "s/library(doMC)//g" ${FOLDER}/network.r
-	sed -i "s/registerDoMC()//g" ${FOLDER}/network.r
-	sed -i "s/options(cores = $CORES)//g" ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/mclapply/lapply/g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/library(codetools)//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/library(multicore)//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/library(iterators)//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/library(foreach)//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/library(doMC)//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/registerDoMC()//g" > ${FOLDER}/network.r
+	cat ${FOLDER}/network.r | sed "s/options(cores = $CORES)//g" > ${FOLDER}/network.r
 fi
 
 #Run R-igraph script



More information about the grass-commit mailing list