From 137fb9621fdc828da19ecd9cb74234ed7c6fdc4a Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Fri, 3 Jun 2005 05:59:46 +0000 Subject: [PATCH] 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 --- ci.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ci.sh b/ci.sh index 4ff4343deb..6e4174afcd 100755 --- a/ci.sh +++ b/ci.sh @@ -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