[mapguide-commits] r6588 - trunk/Installer/scripts
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Apr 25 06:47:15 EDT 2012
Author: jng
Date: 2012-04-25 03:47:15 -0700 (Wed, 25 Apr 2012)
New Revision: 6588
Modified:
trunk/Installer/scripts/build.sh
trunk/Installer/scripts/dpkgmapguide.sh
trunk/Installer/scripts/setvars.sh
Log:
Fix some incorrect bash-isms
Modified: trunk/Installer/scripts/build.sh
===================================================================
--- trunk/Installer/scripts/build.sh 2012-04-23 12:09:23 UTC (rev 6587)
+++ trunk/Installer/scripts/build.sh 2012-04-25 10:47:15 UTC (rev 6588)
@@ -1,7 +1,6 @@
#!/bin/bash
# Make sure setvars.sh is called first before running this script
-source ./setvars.sh
if [ ! -d ${JAVA_HOME} ];
then
@@ -9,8 +8,14 @@
exit
fi
-if [ ${PRESERVE_BUILD_ROOT} != 1 ]
+if [ ! ${MG_BUILD_VARS_SET:-0} -eq 1 ];
then
+echo "Please call setvars.sh first (source ./setvars.sh)"
+exit 1
+fi
+
+if [ ! ${PRESERVE_BUILD_ROOT} -eq 1 ]
+then
rm -rf ${MGSOURCE}
else
echo "Preserving existing build dir"
@@ -19,7 +24,7 @@
REVISION=`svn info ${SVNROOT}${SVNRELPATH} | perl revnum.pl`
echo ${REVISION} > revnum.txt
-if [ ${PRESERVE_BUILD_ROOT} != 1 -o ! -d ${MGSOURCE} ];
+if [ ! ${PRESERVE_BUILD_ROOT} -eq 1 -o ! -d ${MGSOURCE} ];
then
if [ ! -d ${MGSOURCE} ];
then
@@ -51,15 +56,16 @@
./build_apt.sh --prefix ${INSTALLROOT} --with-tomcat
popd
-echo "Building Oem"
# Need an ubuntu-flavoured build_oem.sh if we're doing ubuntu
-if [ ${UBUNTU} = 1 ]
+if [ ${UBUNTU} -eq 1 ]
then
cp ${BUILDROOT}/build_oem_ubuntu.sh .
chmod +x build_oem_ubuntu.sh
- ./build_oem_ubuntu.sh --prefix=${INSTALLROOT}
+ echo "Building Oem (Ubuntu)"
+ ./build_oem_ubuntu.sh --prefix ${INSTALLROOT}
else
- ./build_oem.sh --prefix=${INSTALLROOT}
+ echo "Building Oem (Regular)"
+ ./build_oem.sh --prefix ${INSTALLROOT}
fi
echo "Building Fusion"
Modified: trunk/Installer/scripts/dpkgmapguide.sh
===================================================================
--- trunk/Installer/scripts/dpkgmapguide.sh 2012-04-23 12:09:23 UTC (rev 6587)
+++ trunk/Installer/scripts/dpkgmapguide.sh 2012-04-25 10:47:15 UTC (rev 6588)
@@ -31,7 +31,13 @@
#
#
# Make sure setvars.sh is called first before running this script
-source ./setvars.sh
+
+if [ ! ${MG_BUILD_VARS_SET:-0} -eq 1 ]
+then
+echo "Please call setvars.sh first (source ./setvars.sh)"
+exit 1
+fi
+
BUILDROOT=`pwd`
MGBUILD=${BUILDNUM}
MGINST=usr/local/mapguideopensource-${MGBUILD}
Modified: trunk/Installer/scripts/setvars.sh
===================================================================
--- trunk/Installer/scripts/setvars.sh 2012-04-23 12:09:23 UTC (rev 6587)
+++ trunk/Installer/scripts/setvars.sh 2012-04-25 10:47:15 UTC (rev 6588)
@@ -12,13 +12,13 @@
# Use LOCALSVN=1 if you want to build from an existing copy instead of building
# from an export
export LOCALSVN=1
-export SVNROOT=/home/user
-export SVNRELPATH=/mapguide/trunk/MgDev
+export SVNROOT=/home/jackie
+export SVNRELPATH=/mg-2.4/MgDev
#export SVNROOT="svn://svn.bld.mgproto.net"
#export SVNROOT="http://svn.osgeo.org"
#export SVNRELPATH=/mapguide/trunk/MgDev
export MY_MAKE_OPTS="-j 4"
-export UBUNTU=1
+export UBUNTU=0
export PRESERVE_BUILD_ROOT=1
echo "******************************************************************"
@@ -28,3 +28,4 @@
echo " Is Ubuntu?: ${UBUNTU}"
echo " Preserving the build dir?: ${PRESERVE_BUILD_ROOT}"
echo "******************************************************************"
+export MG_BUILD_VARS_SET=1
More information about the mapguide-commits
mailing list