|
|
Choosing A Webhost: |
svn commit: r370931 - in /lenya/zone/bin: nightlies.sh nightly-branch.sh ni: msg#00105cms.lenya.cvs
Author: thorsten Date: Fri Jan 20 15:55:47 2006 New Revision: 370931 URL: http://svn.apache.org/viewcvs?rev=370931&view=rev Log: splitted nightlies script apart for trunk and branch. nightlies now just calls both scripts. Added: lenya/zone/bin/nightly-branch.sh - copied, changed from r369300, lenya/zone/bin/nightlies.sh lenya/zone/bin/nightly-trunk.sh - copied, changed from r369300, lenya/zone/bin/nightlies.sh Modified: lenya/zone/bin/nightlies.sh Modified: lenya/zone/bin/nightlies.sh URL: http://svn.apache.org/viewcvs/lenya/zone/bin/nightlies.sh?rev=370931&r1=370930&r2=370931&view=diff ============================================================================== --- lenya/zone/bin/nightlies.sh (original) +++ lenya/zone/bin/nightlies.sh Fri Jan 20 15:55:47 2006 @@ -1,121 +1,13 @@ -#!/bin/sh - -help() -{ - cat <<HELP - -This script will build lenya trunk -http://lenya.zones.apache.org:9999/index.html -and lenya-1.2.x -http://lenya.zones.apache.org:8888/index.html - -Further you can invoke/prevent "svn update" -and the building of cocoon/lenya. - -USAGE EXAMPLE: nightlies.sh -u false -c false -EXAMPLE RESULT: lenya site will be just builded. - -USAGE EXAMPLE: nightlies.sh -u true -c false -EXAMPLE RESULT: lenya site will be update to svn HEAD and builded. - -USAGE EXAMPLE: nightlies.sh -u true -c true -EXAMPLE RESULT: cocoon will be updated and builded. -lenya site will be update to svn HEAD and builded. - -Values are: --u = update = true|false --c = cocoon = true|false - -Default is set to true, so if you use ./nightlies.sh -without option we are making a full build. - -HELP -} +#!/usr/bin/bash +source /export/home/lenya/.profile umask 0002 -update=true -cocoon=true -while [ -n "$1" ]; do -case $1 in - -h) help;exit 1;; # function help is called - -u) update=$2;shift 2;; - -c) cocoon=$2;shift 2;; - --) shift;break;; # end of options - -*) echo "error: no such option $1. -h for help.";exit 1;; - *) break;; -esac -done - -if [ $cocoon = true ]; then -#update cocoon -echo "#update (if not set to false) cocoon and build" - cd /export/home/lenya/src/cocoon-2.1.x - if [ $update = true ]; then - echo "#svn up" - svn up - fi - echo "#building" - ./build.sh clean - ./build.sh -#update cocoon for 1.2 -echo "#update (if not set to false) cocoon for 1.2 and build" - cd /export/home/lenya/src/cocoon-2.1.x_1.2 - if [ $update = true ]; then - echo "#svn up" - svn up - fi - echo "#building" - ./build.sh clean - ./build.sh -fi - -#update trunk & restart -echo "#update trunk (if not set to false) & restart" > /tmp/lenya.trunk.update.log -cd /export/home/lenya/src/lenya-trunk -if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.trunk.update.log - svn up >> /tmp/lenya.trunk.update.log -fi -#first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.trunk.update.log -TRUNK_PID=`cat /export/home/lenya/bin/lenya-trunk.pid` -ps -ef | grep lenya|grep $TRUNK_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-trunk.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.trunk.update.log -./build.sh clean >> /tmp/lenya.trunk.update.log -echo "#building" -echo "#building" >> /tmp/lenya.trunk.update.log -./build.sh >> /tmp/lenya.trunk.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.trunk.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.trunk.update.log -echo $! > /export/home/lenya/bin/lenya-trunk.pid -chmod 666 /tmp/lenya.trunk.update.log -#echo "#sending mail" -#cat /tmp/lenya.site.update.log | mail -s "[lenya.zones] lenya-trunk updated" thorsten@xxxxxxxxxx - -#update 1.2 & restart -echo "#update 1.2 (if not set to false) & restart" > /tmp/lenya.branch.update.log -cd /export/home/lenya/src/lenya-1.2.x -if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.branch.update.log - svn up >> /tmp/lenya.branch.update.log -fi -#first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.branch.update.log -BRANCH_PID=`cat /export/home/lenya/bin/lenya-1_2.pid` -ps -ef | grep lenya|grep $BRANCH_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-1_2.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.branch.update.log -./build.sh clean >> /tmp/lenya.branch.update.log -echo "#building" -echo "#building" >> /tmp/lenya.branch.update.log -./build.sh >> /tmp/lenya.branch.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.branch.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.branch.update.log -echo $! > /export/home/lenya/bin/lenya-1_2.pid -chmod 666 /tmp/lenya.branch.update.log +logfileMain=/tmp/nightlies.log +echo "Starting to deploy nightlies " > $logfileMain +echo "starting date is " >> $logfileMain +date >> $logfileMain +echo >> $logfileMain +echo "starting branch" >> $logfileMain +nightly-branch.sh >> $logfileMain 2>&1 +echo >> $logfileMain +echo "starting trunk" >> $logfileMain +nightly-trunk.sh >> $logfileMain 2>&1 \ No newline at end of file Copied: lenya/zone/bin/nightly-branch.sh (from r369300, lenya/zone/bin/nightlies.sh) URL: http://svn.apache.org/viewcvs/lenya/zone/bin/nightly-branch.sh?p2=lenya/zone/bin/nightly-branch.sh&p1=lenya/zone/bin/nightlies.sh&r1=369300&r2=370931&rev=370931&view=diff ============================================================================== --- lenya/zone/bin/nightlies.sh (original) +++ lenya/zone/bin/nightly-branch.sh Fri Jan 20 15:55:47 2006 @@ -4,9 +4,7 @@ { cat <<HELP -This script will build lenya trunk -http://lenya.zones.apache.org:9999/index.html -and lenya-1.2.x +This script will build lenya-1.2.x http://lenya.zones.apache.org:8888/index.html Further you can invoke/prevent "svn update" @@ -26,12 +24,15 @@ -u = update = true|false -c = cocoon = true|false -Default is set to true, so if you use ./nightlies.sh -without option we are making a full build. +Default is set to true, so if you use this script +without option we are making a full build round-trip +and svn update. HELP } umask 0002 +logfile=/tmp/lenya.branch.update.log +echo "Deploying lenya.branch" >> $logfile update=true cocoon=true while [ -n "$1" ]; do @@ -46,76 +47,41 @@ done if [ $cocoon = true ]; then -#update cocoon -echo "#update (if not set to false) cocoon and build" - cd /export/home/lenya/src/cocoon-2.1.x - if [ $update = true ]; then - echo "#svn up" - svn up - fi - echo "#building" - ./build.sh clean - ./build.sh #update cocoon for 1.2 -echo "#update (if not set to false) cocoon for 1.2 and build" +echo >> $logfile +echo "#update (if not set to false) cocoon for 1.2 and build" >> $logfile cd /export/home/lenya/src/cocoon-2.1.x_1.2 if [ $update = true ]; then - echo "#svn up" - svn up + echo >> $logfile + echo "Do svn update ..." >> $logfile + svn up >> $logfile 2>&1 fi - echo "#building" - ./build.sh clean - ./build.sh -fi - -#update trunk & restart -echo "#update trunk (if not set to false) & restart" > /tmp/lenya.trunk.update.log -cd /export/home/lenya/src/lenya-trunk -if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.trunk.update.log - svn up >> /tmp/lenya.trunk.update.log + echo >> $logfile + echo "#building" >> $logfile + ./build.sh clean >> $logfile 2>&1 + ./build.sh >> $logfile 2>&1 fi -#first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.trunk.update.log -TRUNK_PID=`cat /export/home/lenya/bin/lenya-trunk.pid` -ps -ef | grep lenya|grep $TRUNK_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-trunk.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.trunk.update.log -./build.sh clean >> /tmp/lenya.trunk.update.log -echo "#building" -echo "#building" >> /tmp/lenya.trunk.update.log -./build.sh >> /tmp/lenya.trunk.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.trunk.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.trunk.update.log -echo $! > /export/home/lenya/bin/lenya-trunk.pid -chmod 666 /tmp/lenya.trunk.update.log -#echo "#sending mail" -#cat /tmp/lenya.site.update.log | mail -s "[lenya.zones] lenya-trunk updated" thorsten@xxxxxxxxxx #update 1.2 & restart -echo "#update 1.2 (if not set to false) & restart" > /tmp/lenya.branch.update.log +echo >> $logfile +echo "#update 1.2 (if not set to false) & restart" >> $logfile cd /export/home/lenya/src/lenya-1.2.x if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.branch.update.log - svn up >> /tmp/lenya.branch.update.log + echo >> $logfile + echo "Do svn update ..." >> $logfile + svn up >> $logfile 2>&1 fi #first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.branch.update.log +echo >> $logfile +echo "#first, kill running lenya instance" >> $logfile BRANCH_PID=`cat /export/home/lenya/bin/lenya-1_2.pid` -ps -ef | grep lenya|grep $BRANCH_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-1_2.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.branch.update.log -./build.sh clean >> /tmp/lenya.branch.update.log -echo "#building" -echo "#building" >> /tmp/lenya.branch.update.log -./build.sh >> /tmp/lenya.branch.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.branch.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.branch.update.log +ps -ef | grep lenya|grep $BRANCH_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh >> $logfile +rm /export/home/lenya/bin/lenya-1_2.pid >> $logfile +echo "#building clean" >> $logfile 2>&1 +./build.sh clean >> $logfile 2>&1 +echo "#building" >> $logfile +./build.sh >> $logfile 2>&1 +echo "#starting" >> $logfile 2>&1 +./lenya.sh servlet >> $logfile 2>&1 & echo $! > /export/home/lenya/bin/lenya-1_2.pid chmod 666 /tmp/lenya.branch.update.log Copied: lenya/zone/bin/nightly-trunk.sh (from r369300, lenya/zone/bin/nightlies.sh) URL: http://svn.apache.org/viewcvs/lenya/zone/bin/nightly-trunk.sh?p2=lenya/zone/bin/nightly-trunk.sh&p1=lenya/zone/bin/nightlies.sh&r1=369300&r2=370931&rev=370931&view=diff ============================================================================== --- lenya/zone/bin/nightlies.sh (original) +++ lenya/zone/bin/nightly-trunk.sh Fri Jan 20 15:55:47 2006 @@ -6,8 +6,6 @@ This script will build lenya trunk http://lenya.zones.apache.org:9999/index.html -and lenya-1.2.x -http://lenya.zones.apache.org:8888/index.html Further you can invoke/prevent "svn update" and the building of cocoon/lenya. @@ -26,12 +24,14 @@ -u = update = true|false -c = cocoon = true|false -Default is set to true, so if you use ./nightlies.sh -without option we are making a full build. +Default is set to true, so if you use this script +without option we are making a full build round-trip +and svn update. HELP } umask 0002 +logfile=/tmp/lenya.trunk.update.log update=true cocoon=true while [ -n "$1" ]; do @@ -47,75 +47,39 @@ if [ $cocoon = true ]; then #update cocoon -echo "#update (if not set to false) cocoon and build" +echo >> $logfile +echo "#update (if not set to false) cocoon and build" >> $logfile cd /export/home/lenya/src/cocoon-2.1.x if [ $update = true ]; then - echo "#svn up" - svn up + echo >> $logfile + echo "#svn up" >> $logfile + svn up >> $logfile 2>&1 fi - echo "#building" - ./build.sh clean - ./build.sh -#update cocoon for 1.2 -echo "#update (if not set to false) cocoon for 1.2 and build" - cd /export/home/lenya/src/cocoon-2.1.x_1.2 - if [ $update = true ]; then - echo "#svn up" - svn up - fi - echo "#building" - ./build.sh clean - ./build.sh + echo "#building" >> $logfile + ./build.sh clean >> $logfile 2>&1 + ./build.sh >> $logfile 2>&1 fi #update trunk & restart -echo "#update trunk (if not set to false) & restart" > /tmp/lenya.trunk.update.log +echo >> $logfile +echo "#update trunk (if not set to false) & restart" >> $logfile cd /export/home/lenya/src/lenya-trunk if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.trunk.update.log - svn up >> /tmp/lenya.trunk.update.log + echo "#svn up" >> $logfile + svn up >> $logfile 2>&1 fi #first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.trunk.update.log +echo >> $logfile +echo "#first, kill running lenya instance" >> $logfile TRUNK_PID=`cat /export/home/lenya/bin/lenya-trunk.pid` -ps -ef | grep lenya|grep $TRUNK_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-trunk.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.trunk.update.log -./build.sh clean >> /tmp/lenya.trunk.update.log -echo "#building" -echo "#building" >> /tmp/lenya.trunk.update.log -./build.sh >> /tmp/lenya.trunk.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.trunk.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.trunk.update.log +ps -ef | grep lenya|grep $TRUNK_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh >> $logfile +rm /export/home/lenya/bin/lenya-trunk.pid >> $logfile +echo "#building clean" >> $logfile 2>&1 +./build.sh clean >> $logfile 2>&1 +echo "#building" >> $logfile 2>&1 +./build.sh >> $logfile 2>&1 +echo "#starting" >> $logfile 2>&1 +./lenya.sh servlet >> $logfile 2>&1 & echo $! > /export/home/lenya/bin/lenya-trunk.pid chmod 666 /tmp/lenya.trunk.update.log -#echo "#sending mail" -#cat /tmp/lenya.site.update.log | mail -s "[lenya.zones] lenya-trunk updated" thorsten@xxxxxxxxxx -#update 1.2 & restart -echo "#update 1.2 (if not set to false) & restart" > /tmp/lenya.branch.update.log -cd /export/home/lenya/src/lenya-1.2.x -if [ $update = true ]; then - echo "#svn up" - echo "#svn up" >> /tmp/lenya.branch.update.log - svn up >> /tmp/lenya.branch.update.log -fi -#first, kill running lenya instance -echo "#first, kill running lenya instance" >> /tmp/lenya.branch.update.log -BRANCH_PID=`cat /export/home/lenya/bin/lenya-1_2.pid` -ps -ef | grep lenya|grep $BRANCH_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh -rm /export/home/lenya/bin/lenya-1_2.pid -echo "#building clean" -echo "#building clean" >> /tmp/lenya.branch.update.log -./build.sh clean >> /tmp/lenya.branch.update.log -echo "#building" -echo "#building" >> /tmp/lenya.branch.update.log -./build.sh >> /tmp/lenya.branch.update.log -echo "#starting" -echo "#starting" >> /tmp/lenya.branch.update.log -./lenya.sh servlet 2>&1 & >> /tmp/lenya.branch.update.log -echo $! > /export/home/lenya/bin/lenya-1_2.pid -chmod 666 /tmp/lenya.branch.update.log
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r370925 - /lenya/zone/bin/updateZones.sh, thorsten |
|---|---|
| Next by Date: | svn commit: r370936 - in /lenya/zone/bin: lenya-for-forrest.sh nightly-branch.sh nightly-trunk.sh, thorsten |
| Previous by Thread: | svn commit: r370925 - /lenya/zone/bin/updateZones.sh, thorsten |
| Next by Thread: | svn commit: r370936 - in /lenya/zone/bin: lenya-for-forrest.sh nightly-branch.sh nightly-trunk.sh, thorsten |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |