[GRASS-SVN] r48511 - grass-addons/tools/wingrass-packager

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 27 18:52:49 EDT 2011


Author: martinl
Date: 2011-09-27 15:52:49 -0700 (Tue, 27 Sep 2011)
New Revision: 48511

Modified:
   grass-addons/tools/wingrass-packager/grass_compile.sh
   grass-addons/tools/wingrass-packager/grass_packager.bat
Log:
update wingrass support scripts

Modified: grass-addons/tools/wingrass-packager/grass_compile.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_compile.sh	2011-09-27 22:12:46 UTC (rev 48510)
+++ grass-addons/tools/wingrass-packager/grass_compile.sh	2011-09-27 22:52:49 UTC (rev 48511)
@@ -2,6 +2,7 @@
 # Compile GRASS 6.4, 6.5 and 7.0 (update source code from SVN repository)
 
 SRC=/osgeo4w/usr/src
+PACKAGEDIR="mswindows/osgeo4w/package"
 
 function update {
     echo "Updating $1..."     
@@ -9,23 +10,40 @@
     svn up || (svn cleanup && svn up)
 }
 
+function rm_package_7 {
+    for f in `/c/OSGeo4W/apps/msys/bin/find $PACKAGEDIR/grass*.tar.bz2 -mtime +7 2>/dev/null`; do
+        rm -rfv $f
+    done
+}
+
+function rsync_package {
+    dst="/c/Users/landa/grass_packager/grass$1"
+    rm -rf $dst/package
+    cp -r $PACKAGEDIR $dst
+}
+
 function compile {
-    echo "Compiling $1..."
     cd $SRC/$1
+    rm_package_7 
+    curr=`ls -t $PACKAGEDIR/ 2>/dev/null | head -n1 | cut -d'-' -f3 | cut -d'.' -f1`
+    if [ $? -eq 0 ]; then
+	package=$(($curr+1))
+    else
+	package=1
+    fi
+    echo "Compiling $1 ($package)..."
     rm -f mswindows/osgeo4w/configure-stamp
     svn up || (svn cleanup && svn up)
-    ./mswindows/osgeo4w/package.sh $2
+    ./mswindows/osgeo4w/package.sh $package
+    rsync_package $2
 }
 
 export PATH=$PATH:/c/OSGeo4W/apps/msys/bin
 
-# empty for native installer
-PACKAGE=$1
-
 update grass_addons
 
-compile grass64_release $PACKAGE
-compile grass6_devel $PACKAGE
-compile grass_trunk $PACKAGE
+compile grass64_release 64
+compile grass6_devel 65
+compile grass_trunk 70
 
 exit 0

Modified: grass-addons/tools/wingrass-packager/grass_packager.bat
===================================================================
--- grass-addons/tools/wingrass-packager/grass_packager.bat	2011-09-27 22:12:46 UTC (rev 48510)
+++ grass-addons/tools/wingrass-packager/grass_packager.bat	2011-09-27 22:52:49 UTC (rev 48511)
@@ -7,7 +7,7 @@
 rmdir /s /q C:\OSGeo4W\apps\grass\grass-6.5.svn
 rmdir /s /q C:\OSGeo4W\apps\grass\grass-7.0.svn
 rem native & osgeo4w
-C:\OSGeo4W\apps\msys\bin\bash.exe C:\Users\landa\grass_packager\grass_compile.sh 1
+C:\OSGeo4W\apps\msys\bin\bash.exe C:\Users\landa\grass_packager\grass_compile.sh
 
 rem Preparation
 if exist .\grass64 rmdir /S/Q .\grass64
@@ -43,8 +43,8 @@
 C:\OSGeo4W\apps\msys\bin\sh.exe .\grass_md5sum.sh
 
 pscp.exe -i .\ssh\id_dsa.ppk .\grass64\WinGRASS*.exe* landa at geo102:/work/wingrass/grass64
-pscp.exe -i .\ssh\id_dsa.ppk .\grass64\grass*.tar.bz2 landa at geo102:/work/wingrass/grass64/osgeo4w
+pscp.exe -i .\ssh\id_dsa.ppk .\grass64\osgeo4w\package\grass*.tar.bz2 landa at geo102:/work/wingrass/grass64/osgeo4w
 pscp.exe -i .\ssh\id_dsa.ppk .\grass65\WinGRASS*.exe* landa at geo102:/work/wingrass/grass65
-pscp.exe -i .\ssh\id_dsa.ppk .\grass65\grass*.tar.bz2 landa at geo102:/work/wingrass/grass65/osgeo4w
+pscp.exe -i .\ssh\id_dsa.ppk .\grass65\osgeo4w\package\grass*.tar.bz2 landa at geo102:/work/wingrass/grass65/osgeo4w
 pscp.exe -i .\ssh\id_dsa.ppk .\grass70\WinGRASS*.exe* landa at geo102:/work/wingrass/grass70
-pscp.exe -i .\ssh\id_dsa.ppk .\grass70\grass*.tar.bz2 landa at geo102:/work/wingrass/grass70/osgeo4w
+pscp.exe -i .\ssh\id_dsa.ppk .\grass70\osgeo4w\package\grass*.tar.bz2 landa at geo102:/work/wingrass/grass70/osgeo4w



More information about the grass-commit mailing list