[mapguide-commits] r6587 - trunk/Installer/scripts
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Apr 23 08:09:23 EDT 2012
Author: jng
Date: 2012-04-23 05:09:23 -0700 (Mon, 23 Apr 2012)
New Revision: 6587
Modified:
trunk/Installer/scripts/build.sh
trunk/Installer/scripts/dpkgmapguide.sh
Log:
Auto-call setvars.sh in main build scripts and remove all sudo commands. Just already assume execution with superuser privileges
Modified: trunk/Installer/scripts/build.sh
===================================================================
--- trunk/Installer/scripts/build.sh 2012-04-22 13:29:05 UTC (rev 6586)
+++ trunk/Installer/scripts/build.sh 2012-04-23 12:09:23 UTC (rev 6587)
@@ -1,6 +1,7 @@
#!/bin/bash
# Make sure setvars.sh is called first before running this script
+source ./setvars.sh
if [ ! -d ${JAVA_HOME} ];
then
@@ -10,14 +11,14 @@
if [ ${PRESERVE_BUILD_ROOT} != 1 ]
then
- sudo rm -rf ${MGSOURCE}
+ rm -rf ${MGSOURCE}
else
echo "Preserving existing build dir"
fi
-sudo rm -rf ${INSTALLROOT}
+rm -rf ${INSTALLROOT}
REVISION=`svn info ${SVNROOT}${SVNRELPATH} | perl revnum.pl`
-sudo echo ${REVISION} > revnum.txt
+echo ${REVISION} > revnum.txt
if [ ${PRESERVE_BUILD_ROOT} != 1 -o ! -d ${MGSOURCE} ];
then
if [ ! -d ${MGSOURCE} ];
@@ -29,6 +30,8 @@
then
echo "Making local SVN copy to ${MGSOURCE}"
cp -R ${SVNROOT}${SVNRELPATH} ${MGSOURCE}
+ echo "Cleaning out .svn directories"
+ find . -name .svn -exec rm -rf {} \;
else
echo "Performing fresh SVN export to ${MGSOURCE}"
svn export -q -r ${REVISION} ${SVNROOT}${SVNRELPATH} ${MGSOURCE}
@@ -45,7 +48,7 @@
echo "Building LinuxApt"
pushd ${MGSOURCE}/Oem/LinuxApt
-sudo ./build_apt.sh --prefix ${INSTALLROOT} --with-tomcat
+./build_apt.sh --prefix ${INSTALLROOT} --with-tomcat
popd
echo "Building Oem"
@@ -54,9 +57,9 @@
then
cp ${BUILDROOT}/build_oem_ubuntu.sh .
chmod +x build_oem_ubuntu.sh
- sudo ./build_oem_ubuntu.sh --prefix=${INSTALLROOT}
+ ./build_oem_ubuntu.sh --prefix=${INSTALLROOT}
else
- sudo ./build_oem.sh --prefix=${INSTALLROOT}
+ ./build_oem.sh --prefix=${INSTALLROOT}
fi
echo "Building Fusion"
@@ -72,7 +75,7 @@
autoconf
./configure --enable-optimized --prefix=${INSTALLROOT}
make $MY_MAKE_OPTS
-sudo make install
+make install
echo "Preparing binaries for packaging"
# Prepare binaries for packaging by removing unnecessary
@@ -83,22 +86,16 @@
for libdir in ${LIBDIRS}
do
# Remove any .la and .a files in lib directories
- sudo rm -f ${libdir}/*.la
- sudo rm -f ${libdir}/*.a
+ rm -f ${libdir}/*.la
+ rm -f ${libdir}/*.a
# Remove unneeded symbols from files in the lib directories
for file in `find ${libdir}/lib*.so* -type f -print`
do
- sudo strip --strip-unneeded ${file}
- sudo chmod a-x ${file}
+ strip --strip-unneeded ${file}
+ chmod a-x ${file}
done
done
-if [ ${LOCALSVN} = 1 ]
-then
- echo "Stripping out .svn directories"
- # Empty out all .svn directories
- find -name "\.svn" -exec sudo rm -rf {} \;
-fi
popd
echo "Creating MapGuide Open Source binary tarball"
@@ -108,6 +105,6 @@
mkdir -p bin
fi
-sudo tar -zcf bin/mapguideopensource-${BUILDNUM}.${REVISION}.tar.gz ${INSTALLROOT} ${LOCKFILEDIR}
+tar -zcf bin/mapguideopensource-${BUILDNUM}.${REVISION}.tar.gz ${INSTALLROOT} ${LOCKFILEDIR}
echo "Build complete!"
Modified: trunk/Installer/scripts/dpkgmapguide.sh
===================================================================
--- trunk/Installer/scripts/dpkgmapguide.sh 2012-04-22 13:29:05 UTC (rev 6586)
+++ trunk/Installer/scripts/dpkgmapguide.sh 2012-04-23 12:09:23 UTC (rev 6587)
@@ -31,6 +31,7 @@
#
#
# Make sure setvars.sh is called first before running this script
+source ./setvars.sh
BUILDROOT=`pwd`
MGBUILD=${BUILDNUM}
MGINST=usr/local/mapguideopensource-${MGBUILD}
More information about the mapguide-commits
mailing list