put in a check to see if the script is already running

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@179734 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-06-03 05:59:46 +00:00
parent 2162ac0614
commit 137fb9621f
1 changed files with 17 additions and 5 deletions

22
ci.sh
View File

@ -6,14 +6,26 @@ CMD=$1
[ "$1" = "" ] && echo && echo "You must specify a checkout or update!" && echo && exit 1
HOME_DIR=`pwd`
FROM=jvanzyl@maven.org
TO=dev@maven.apache.org
DATE=`date`
PID=$$
RUNNING=`ps -ef | grep ci.sh | grep -v 'sh -c' | grep -v grep | grep -v $PID`
if [ ! -z "$RUNNING" ]; then
echo "From: $FROM" > running_log
echo "To: $TO" >> running_log
echo "Subject: [maven2 build - FAILED - $CMD] $DATE" >>running_log
echo "" >> running_log
echo "ci.sh already running... exiting" >>running_log
echo "$RUNNING" >>running_log
/usr/sbin/sendmail -t < running_log
exit 1
fi
HOME_DIR=`pwd`
DIR=m2-build
REPO=maven-repo-local
FROM=jvanzyl@maven.org
#FROM=brett@apache.org
#TO=maven2-user@lists.codehaus.org
TO=dev@maven.apache.org
SCM_LOG=scm.log
TIMESTAMP=`date +%Y%m%d.%H%M%S`
DEPLOY_DIR=$HOME_DIR/public_html/m2