X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=build.xml;h=7e30af26aa893accc9a70f9fa000d2b51bf419b1;hp=3b09121c1a96fcacad696c3333a62d83163d920c;hb=9ec1b53622082de5a64775a38558cc7777280aaf;hpb=88ffc93f505271834240412c9d17c4dea1b8ab77 diff --git a/build.xml b/build.xml index 3b09121..7e30af2 100644 --- a/build.xml +++ b/build.xml @@ -1,4 +1,4 @@ - + @@ -7,19 +7,10 @@ - - - - - - - - - @@ -27,174 +18,56 @@ - - find . -name \*\~ | xargs rm -f - find . -name \#\*\# | xargs rm -f - rm -rf bin-* bin xwt/html/dist/ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # throw on the prefix/suffix where needed - for A in `find www/html -name \*.html_` - do (cat www/html/prefix.html; cat $A; cat www/html/suffix.html; cat "$A"_ 2>/dev/null; cat www/html/tagline.html) > `echo $A | sed s/_\$//g` - done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # first, clone the currently running copy of xwt, so we can use rsync to save bandwidth - rm -rf /xwt-new - mkdir -p /xwt - mkdir -p /xwt-new - cd /xwt - tar cf - . | tar xf - -C /xwt-new - - - - # tidy up and rsync our changes - find www/html -name \*~ | xargs rm -f - rsync -Pv --delete -rze ssh www/ root@${host}:/xwt-new/www/ - - - - # stop services - /sbin/start-stop-daemon --stop --pidfile /var/log/xwt/apache.pid --exec /usr/sbin/apache - /sbin/start-stop-daemon --stop --pidfile /var/log/xwt/tomcat.pid --user www-data - - rm -rf /xwt-old - mv /xwt /xwt-old - mv /xwt-new /xwt - - mkdir /var/log/xwt &>/dev/null - chown www-data /var/log/xwt/ - - ln -s /xwt/www/webapps /xwt/www/webapps/ROOT - ln -s /xwt/www/webapps /xwt/www/webapps/WEB-INF - ln -s /xwt/www/launch /xwt/www/launch/ROOT - ln -s /xwt/www/launch /xwt/www/launch/WEB-INF - - export JAVA_HOME=/usr/lib/j2sdk1.3 - export CLASSPATH=$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/tools.jar:/usr/share/tomcat/classes:/usr/share/tomcat/lib/tomcat.jar - - touch /var/log/xwt/tomcat.log - chown www-data /var/log/xwt/tomcat.log - - test ${host} == "xwt-staging.org" && echo -e "User-agent: *\nDisallow: /\n" > /xwt/www/html/robots.txt - - /sbin/start-stop-daemon \ - --start --pidfile /var/log/xwt/tomcat.pid --make-pidfile --chuid www-data --exec \ - /usr/lib/j2sdk1.3/bin/java -- -server -Dtomcat.home=/usr/share/tomcat -Xmx500M \ - org.apache.tomcat.startup.Main -config /xwt/www/etc/server.xml start \ - >> /var/log/xwt/tomcat.log 2>&1 & - - /sbin/start-stop-daemon --start --pidfile /var/log/xwt/apache.pid --exec /usr/sbin/apache -- -f /xwt/www/etc/httpd.conf ${staging-flag} - - - - -