Author: jfrederic.clere(a)jboss.com
Date: 2009-01-20 09:13:21 -0500 (Tue, 20 Jan 2009)
New Revision: 2184
Modified:
trunk/mod_cluster/test/java/installhttpd.sh
Log:
Prevent using a name with space in windoze.
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-20 13:48:51 UTC (rev 2183)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-20 14:13:21 UTC (rev 2184)
@@ -74,6 +74,7 @@
echo "on ${BUILD_SYS} ${BUILD_CPU}"
BUILD_TAG=${BUILD_SYS}-${BUILD_CPU}
EXT=tar.gz
+BASEHTTPD=opt/jboss/httpd
case $BUILD_TAG in
*hpux-parisc2*)
BASE=mod_cluster-hp-ux-9000_800
@@ -99,6 +100,7 @@
*windows*)
BASE=mod_cluster-windows
EXT=zip
+ BASEHTTPD=httpd-2.2
;;
esac
#PACKAGE=rhel-httpd-2.2.8-1.el5s2
@@ -121,10 +123,18 @@
wget ${TARBALL}
fi
TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
+
+# prevent spaces...
+counts=`echo $BASELOC | wc -w`
+if [ $count != "1" ]
+then
+ BASELOC=BASELOC
+fi
export BASELOC
echo "Base is: $BASELOC !!!"
+
# Clean previous install
-rm -rf $BASELOC/opt/jboss
+rm -rf $BASELOC/$BASEHTTPD
case ${EXT} in
tar.gz)
(cd $BASELOC
@@ -140,26 +150,26 @@
#
# Arrange the installed files
#
-files="opt/jboss/httpd/sbin/apachectl opt/jboss/httpd/httpd/conf/httpd.conf
opt/jboss/httpd/sbin/envvars"
+files="${BASEHTTPD}/sbin/apachectl ${BASEHTTPD}/httpd/conf/httpd.conf
${BASEHTTPD}/sbin/envvars"
for FILE in `echo $files`
do
file=${BASELOC}/$FILE
echo "$file"
cp -p $file $file.new
- sed "s:opt/jboss/httpd:${BASELOC}/opt/jboss/httpd:" $file > $file.new
+ sed "s:${BASEHTTPD}:${BASELOC}/${BASEHTTPD}:" $file > $file.new
mv $file $file.`date +%y%m%d.%H%M%S`.org
mv $file.new $file
done
# Arrange apachectl
-file=$BASELOC/opt/jboss/httpd/sbin/apachectl
+file=$BASELOC/${BASEHTTPD}/sbin/apachectl
cp -p $file $file.new
-echo "s:\$HTTPD -k \$ARGV:\$HTTPD -k \$ARGV -d
${BASELOC}/opt/jboss/httpd/httpd:" > sed.cmd
+echo "s:\$HTTPD -k \$ARGV:\$HTTPD -k \$ARGV -d ${BASELOC}/${BASEHTTPD}/httpd:"
> sed.cmd
sed -f sed.cmd $file > $file.new
mv $file $file.`date +%y%m%d.%H%M%S`.1.org
mv $file.new $file
# Arrange httpd.conf
-file=$BASELOC/opt/jboss/httpd/httpd/conf/httpd.conf
+file=$BASELOC/${BASEHTTPD}/httpd/conf/httpd.conf
cp -p $file $file.new
echo "s/Listen 80/Listen @IP@:8000/" > sed.cmd
echo "s/LoadModule proxy_balancer/#LoadModule proxy_balancer/" >>
sed.cmd
@@ -193,5 +203,5 @@
mv $file.new.1 $file
# restore the execute permissions.
-chmod a+x $BASELOC/opt/jboss/httpd/sbin/*
-chmod a+x $BASELOC/opt/jboss/httpd/bin/*
+chmod a+x $BASELOC/${BASEHTTPD}/sbin/*
+chmod a+x $BASELOC/${BASEHTTPD}/bin/*
Show replies by date