[GRASS-SVN] r50453 - grass-addons/tools/wingrass-packager
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 25 15:31:47 EST 2012
Author: martinl
Date: 2012-01-25 12:31:47 -0800 (Wed, 25 Jan 2012)
New Revision: 50453
Modified:
grass-addons/tools/wingrass-packager/grass_compile.sh
grass-addons/tools/wingrass-packager/grass_svn_info.sh
Log:
winGRASS support files: use same postfix for standalone and osgeo4w packages
Modified: grass-addons/tools/wingrass-packager/grass_compile.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_compile.sh 2012-01-25 17:36:11 UTC (rev 50452)
+++ grass-addons/tools/wingrass-packager/grass_compile.sh 2012-01-25 20:31:47 UTC (rev 50453)
@@ -12,16 +12,20 @@
function compile {
cd $SRC/$1
+ svn up || (svn cleanup && svn up)
+
rm_package_7
- curr=`ls -t $PACKAGEDIR/ 2>/dev/null | head -n1 | cut -d'-' -f4 | cut -d'.' -f1`
+ curr=`ls -t $PACKAGEDIR/ 2>/dev/null | head -n1 | cut -d'-' -f5 | cut -d'.' -f1`
if [ $? -eq 0 ]; then
- package=$(($curr+1))
+ num=$(($curr+1))
else
- package=1
+ num=1
fi
+ rev=`svn info | grep 'Last Changed Rev:' | cut -d':' -f2 | tr -d ' '`
+ package="r$rev-$num"
+
echo "Compiling $1 ($package)..."
rm -f mswindows/osgeo4w/configure-stamp
- svn up || (svn cleanup && svn up)
./mswindows/osgeo4w/package.sh $package $2
}
Modified: grass-addons/tools/wingrass-packager/grass_svn_info.sh
===================================================================
--- grass-addons/tools/wingrass-packager/grass_svn_info.sh 2012-01-25 17:36:11 UTC (rev 50452)
+++ grass-addons/tools/wingrass-packager/grass_svn_info.sh 2012-01-25 20:31:47 UTC (rev 50453)
@@ -2,13 +2,28 @@
# Update SVN version info
SRC=/osgeo4w/usr/src
+PACKAGEDIR=mswindows/osgeo4w/package
HOME=/c/Users/landa/grass_packager
function update {
cd $SRC/$1
REV=`svn info | grep 'Last Changed Rev:' | cut -d':' -f2 | tr -d ' '`
- sed "s/SVN_REVISION \"36599\"/SVN_REVISION \"$REV\"/g" $HOME/$2/GRASS-Installer.nsi > tmp
- mv tmp $HOME/$2/GRASS-Installer.nsi
+ NUM=`ls -t $PACKAGEDIR/ 2>/dev/null | head -n1 | cut -d'-' -f5 | cut -d'.' -f1`
+
+ exec 3<include/VERSION
+ read MAJOR <&3
+ read MINOR <&3
+ read PATCH <&3
+ if [[ "$PATCH" == *svn* ]] ; then
+ TYPE="Devel"
+ else
+ TYPE="Release"
+ fi
+ sed "s/SVN_REVISION \"36599\"/SVN_REVISION \"$REV\"/g" $HOME/$2/GRASS-Installer.nsi > tmp1
+ sed "s/BINARY_REVISION \"1\"/BINARY_REVISION \"$NUM\"/g" tmp1 > tmp2
+ sed "s/INSTALLER_TYPE \"Devel\"/INSTALLER_TYPE \"$TYPE\"/g" tmp2 > tmp3
+ rm tmp1 tmp2
+ mv tmp3 $HOME/$2/GRASS-Installer.nsi
}
export PATH=$PATH:/c/OSGeo4W/apps/msys/bin
More information about the grass-commit
mailing list