]> source.dussan.org Git - archiva.git/commitdiff
o make the log work from cron or manual run
authorJason van Zyl <jvanzyl@apache.org>
Sun, 5 Nov 2006 23:48:29 +0000 (23:48 +0000)
committerJason van Zyl <jvanzyl@apache.org>
Sun, 5 Nov 2006 23:48:29 +0000 (23:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471573 13f79535-47bb-0310-9956-ffa450edef68

maven-meeper/src/bin/synchronize.sh

index 69776b5644b3a5d948f094b3d0b0874cda87bab5..463cc9000123b98273e76a5e7eff25f2e2e6c491 100755 (executable)
@@ -9,21 +9,21 @@
 # 6. Copy the mod_rewrite rules to the Maven 1.x repository @ Ibiblio
 # ------------------------------------------------------------------------
 
-dir=`pwd`
-syncProperties=$dir/synchronize.properties
-
-MODE=$1
 PID=$$
-
-(
-
 RUNNING=`ps -ef | grep synchronize.sh | grep -v 'sh -c' | grep -v grep | grep -v $PID`
+echo $RUNNING
 if [ ! -z "$RUNNING" ]; then
   echo Sync already running... exiting
   echo $RUNNING
   exit 1
 fi
 
+(
+
+dir=`pwd`
+syncProperties=$dir/synchronize.properties
+MODE=$1
+
 . $syncProperties
 
 echo "Using the following settings:"
@@ -119,4 +119,4 @@ cp $M1_M2_REWRITE_RULES $MAVEN1_REPO/.htaccess
     
 scp $M1_M2_REWRITE_RULES maven@login.ibiblio.org:/public/html/maven/.htaccess   
 
-) > $HOME/repository-staging/to-ibiblio/reports/sync/last-sync-results.txt 2>&1
+) 2>&1 | tee $HOME/repository-staging/to-ibiblio/reports/sync/last-sync-results.txt