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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 19 01:33:43 PDT 2013


Author: martinl
Date: 2013-04-19 01:33:43 -0700 (Fri, 19 Apr 2013)
New Revision: 55910

Modified:
   grass-addons/tools/wingrass-packager/grass_addons.sh
   grass-addons/tools/wingrass-packager/grass_copy_wwwroot.sh
   grass-addons/tools/wingrass-packager/grass_svn_info.sh
Log:
wingrass: update building scripts, add addons for 6.4.3RC2

Modified: grass-addons/tools/wingrass-packager/grass_addons.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_addons.sh	2013-04-19 08:07:14 UTC (rev 55909)
+++ grass-addons/tools/wingrass-packager/grass_addons.sh	2013-04-19 08:33:43 UTC (rev 55910)
@@ -55,6 +55,7 @@
 
 if test -z $1 ; then
     # dev packages
+    compile $SVN_PATH/grass6 $GISBASE_PATH/grass64_release $ADDON_PATH/grass643RC2/addons
     compile $SVN_PATH/grass6 $GISBASE_PATH/grass64_release $ADDON_PATH/grass64/addons
     compile $SVN_PATH/grass6 $GISBASE_PATH/grass6_devel    $ADDON_PATH/grass65/addons
     compile $SVN_PATH/grass7 $GISBASE_G7_PATH/grass_trunk  $ADDON_PATH/grass70/addons _g7

Modified: grass-addons/tools/wingrass-packager/grass_copy_wwwroot.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_copy_wwwroot.sh	2013-04-19 08:07:14 UTC (rev 55909)
+++ grass-addons/tools/wingrass-packager/grass_copy_wwwroot.sh	2013-04-19 08:33:43 UTC (rev 55910)
@@ -20,11 +20,23 @@
     mkdir $WWWDIR/grass$1/logs
     cp -r log-r*         $WWWDIR/grass$1/logs
 
+    copy_addon $1 $2
+}
+
+function copy_addon {
+    version=$1
+    version_full=$2
+
+    cd $HOME/grass$version
+
+    echo "Copying AddOns for grass${version}..."
+    
     if test -n "$2"; then
-	ADDONDIR=$WWWDIR/grass$1/addons/grass-$2
+	ADDONDIR=$WWWDIR/grass${version:0:2}/addons/grass-$version_full
     else
-	ADDONDIR=$WWWDIR/grass$1/addons
+	ADDONDIR=$WWWDIR/grass${version:0:2}/addons
     fi
+        
     mkdir -p $ADDONDIR
     
     cp    addons/*zip addons/*.md5sum $ADDONDIR
@@ -34,10 +46,12 @@
 export PATH=$PATH:/c/OSGeo4W/apps/msys/bin
 
 if test -z $1 ; then
-    # dev packages
+    # svn packages
     copy 64 6.4.3svn
     copy 65
     copy 70
+    # releases
+    copy_addon 643RC2 6.4.3RC2
 else
     copy $1 $2
 fi

Modified: grass-addons/tools/wingrass-packager/grass_svn_info.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_svn_info.sh	2013-04-19 08:07:14 UTC (rev 55909)
+++ grass-addons/tools/wingrass-packager/grass_svn_info.sh	2013-04-19 08:33:43 UTC (rev 55910)
@@ -7,19 +7,22 @@
 
 function update {
     if [ "$1" = "grass_trunk" ] ; then
-	cd /c/osgeo4w_g7/$SRC/$1
+	SRC_PATH=/c/osgeo4w_g7/$SRC/$1
     else
-	cd /c/osgeo4w/$SRC/$1
+	SRC_PATH=/c/osgeo4w/$SRC/$1
     fi
+    DEST_PATH=$HOME/$2
     
+    cd $SRC_PATH
+
     REV=`svn info | grep 'Last Changed Rev:' | cut -d':' -f2 | tr -d ' '`
-    if test -z $4 ; then
+    if test -z $3 ; then
 	NUM=`ls -t $PACKAGEDIR/ 2>/dev/null | head -n1 | cut -d'-' -f5 | cut -d'.' -f1`
 	if [ "x$NUM" = "x" ]; then
 	    NUM=1
 	fi
     else
-	NUM=$4
+	NUM=$3
     fi
     
     exec 3<include/VERSION 
@@ -35,15 +38,17 @@
     fi
     sed -e "s/BINARY_REVISION \"1\"/BINARY_REVISION \"$NUM\"/g" \
 	-e "s/INSTALLER_TYPE \"Devel\"/INSTALLER_TYPE \"$TYPE\"/g" \
-	$HOME/$2/GRASS-Installer.nsi > tmp
-    mv tmp $HOME/$2/GRASS-Installer.nsi
+	$DEST_PATH/GRASS-Installer.nsi > tmp
+    mv tmp $DEST_PATH/GRASS-Installer.nsi
+    cp error.log $DEST_PATH
 
-    create_log $SRC/$1 $2 $REV $NUM
+    create_log $MAJOR$MINOR $REV $NUM
 }
 
 function create_log {
-    cd $HOME/$2
-    LOG_DIR=log-r$3-$4
+    cd $HOME/grass$1
+    LOG_DIR=log-r$2-$3
+    
     mkdir -p $LOG_DIR
     cp osgeo4w/package.log $LOG_DIR/
     cp error.log $LOG_DIR/
@@ -51,13 +56,16 @@
 
 export PATH=$PATH:/c/OSGeo4W/apps/msys/bin
 
-if test -z $1 ; then
+VERSION=$1
+NUM=$2
+
+if test -z $VERSION ; then
     # dev packages
     update grass64_release grass64
     update grass6_devel    grass65
     update grass_trunk     grass70
 else
-    update grass$1         grass$1 $2
+    update grass$VERSION   grass$VERSION $NUM
 fi
 
 exit 0



More information about the grass-commit mailing list