geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1087326 - /geronimo/sandbox/forrest/tck/svnupdate.sh
Date Thu, 31 Mar 2011 15:07:15 GMT
Author: xiaming
Date: Thu Mar 31 15:07:14 2011
New Revision: 1087326

URL: http://svn.apache.org/viewvc?rev=1087326&view=rev
Log:
Adjust tag output order so that it reflect the real situation

Modified:
    geronimo/sandbox/forrest/tck/svnupdate.sh

Modified: geronimo/sandbox/forrest/tck/svnupdate.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/forrest/tck/svnupdate.sh?rev=1087326&r1=1087325&r2=1087326&view=diff
==============================================================================
--- geronimo/sandbox/forrest/tck/svnupdate.sh (original)
+++ geronimo/sandbox/forrest/tck/svnupdate.sh Thu Mar 31 15:07:14 2011
@@ -1,10 +1,10 @@
 #!/bin/sh
 
-OWB_REV=$OWB_REV
-OPENEJB_REV=$OPENEJB_REV
-WINK_REV=$WINK_REV
-GERONIMO_REV=$GERONIMO_REV
-GERONIMOTCK_REV=$GERONIMOTCK_REV
+OWB_CUR_REV=$OWB_REV
+OPENEJB_CUR_REV=$OPENEJB_REV
+WINK_CUR_REV=$WINK_REV
+GERONIMO_CUR_REV=$GERONIMO_REV
+GERONIMOTCK_CUR_REV=$GERONIMOTCK_REV
 
 if [ -d $HOME/tckdata/tckbuildsrc ]; then
     # enter the working directory
@@ -12,144 +12,175 @@ if [ -d $HOME/tckdata/tckbuildsrc ]; the
     
     # Update openwebbeans    
     OWB_PRE_REV=`cat owb_rev`
-    if [ -n "$OWB_REV" ] && [ "$OWB_REV" != "$OWB_PRE_REV" ]; then
+    if [ -n "$OWB_CUR_REV" ] && [ "$OWB_CUR_REV" != "$OWB_PRE_REV" ]; then
         # target is not null and not equal the previous, then remove the existing and check
-        # out the new revision
-        echo "$OWB_REV" > owb_rev
+        # out the new revision        
         [ -d $HOME/tckdata/tckbuildsrc/openwebbeans ] && rm -rf openwebbeans
-        svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_REV openwebbeans
-        [ $? -ne 0 ] && exit 1
-        echo "Openwebbeans is checked out at revision $OWB_REV!"
+        svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_CUR_REV openwebbeans
+        if [ $? -ne 0 ]; then
+           exit 1
+        else        
+            echo "$OWB_CUR_REV" > owb_rev
+            echo "Openwebbeans is checked out at revision $OWB_CUR_REV!"
+        fi
     else
-        if [ "$OWB_REV" = "" ]; then
-            # if target revision is null, update the code to the latest revision
-            echo "" > owb_rev
-            if [ -d $HOME/tckdata/tckbuildsrc/openwebbeans ]; then
-                echo "Update openwebbeans to latest!"
+        if [ "$OWB_CUR_REV" = "" ]; then
+            # if target revision is null, update the code to the latest revision        
   
+            if [ -d $HOME/tckdata/tckbuildsrc/openwebbeans ]; then                
                 cd $HOME/tckdata/tckbuildsrc/openwebbeans
                 svn --non-interactive --accept theirs-full update
                 [ $? -ne 0 ] && exit 1
-                cd ..            
+                echo "" > owb_rev
+                echo "Update openwebbeans to latest!"
+                cd ..
+            else
+                # target dir is not exist, so checkout
+                svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_CUR_REV openwebbeans
  
+                [ $? -ne 0 ] && exit 1
+                echo "" > owb_rev
+                echo "Update openwebbeans to latest!"   
             fi
         else
-            echo "owb's revision=$OWB_REV same as before!"            
+            echo "owb's revision=$OWB_CUR_REV same as before!"            
         fi        
     fi
     
     # Update openejb3 
     OPENEJB_PRE_REV=`cat openejb_rev`
-    if [ -n "$OPENEJB_REV" ] && [ "$OPENEJB_REV" != "$OPENEJB_PRE_REV" ]; then
-        echo "$OPENEJB_REV" > openejb_rev
+    if [ -n "$OPENEJB_CUR_REV" ] && [ "$OPENEJB_CUR_REV" != "$OPENEJB_PRE_REV" ];
then
+        # target is not null and not equal the previous, then remove the existing and check
+        # out the new revision
         [ -d $HOME/tckdata/tckbuildsrc/openejb ] && rm -rf openejb
-        svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_REV openejb
-        [ $? -ne 0 ] && exit 1
-        echo "Openejb is checked out at revision $OPENEJB_REV!"
+        svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_CUR_REV openejb
+        [ $? -ne 0 ] && exit 2
+        echo "$OPENEJB_CUR_REV" > openejb_rev
+        echo "Openejb is checked out at revision $OPENEJB_CUR_REV!"
     else
-        if [ "$OPENEJB_REV" = "" ]; then
-            echo "" > openejb_rev
-            if [ -d $HOME/tckdata/tckbuildsrc/openejb ]; then
-                echo "Update openejb to latest!"
+        if [ "$OPENEJB_CUR_REV" = "" ]; then            
+            if [ -d $HOME/tckdata/tckbuildsrc/openejb ]; then                
                 cd $HOME/tckdata/tckbuildsrc/openejb
                 svn --non-interactive --accept theirs-full update
-                [ $? -ne 0 ] && exit 1
-                cd ..            
+                [ $? -ne 0 ] && exit 2
+                echo "" > openejb_rev
+                echo "Update openejb to latest!"
+                cd ..   
+            else
+                # target dir is not exist, so checkout
+                svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_CUR_REV
openejb
+                [ $? -ne 0 ] && exit 2
+                echo "" > openejb_rev
+                echo "Update openejb to latest!"
             fi
         else
-            echo "openejb's revision=$OPENEJB_REV same as before!"
-        fi
-        
+            echo "openejb's revision=$OPENEJB_CUR_REV same as before!"
+        fi        
     fi
     
     # Update wink
     WINK_PRE_REV=`cat wink_rev`
-    if [ -n "$WINK_REV" ] && [ "$WINK_REV" != "$WINK_PRE_REV" ]; then
-        echo "$WINK_REV" > wink_rev
+    if [ -n "$WINK_CUR_REV" ] && [ "$WINK_CUR_REV" != "$WINK_PRE_REV" ]; then   
    
         [ -d $HOME/tckdata/tckbuildsrc/wink ] && rm -rf wink
-        svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_REV wink
-        [ $? -ne 0 ] && exit 1
-        echo "wink is checked out at revision $WINK_REV!"
+        svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_CUR_REV wink
+        [ $? -ne 0 ] && exit 3
+        echo "$WINK_CUR_REV" > wink_rev
+        echo "wink is checked out at revision $WINK_CUR_REV!"
     else
-        if [ "$WINK_REV" = "" ]; then
-            echo "" > wink_rev
-            if [ -d $HOME/tckdata/tckbuildsrc/wink ]; then
-                echo "Update wink to latest!"
+        if [ "$WINK_CUR_REV" = "" ]; then
+            
+            if [ -d $HOME/tckdata/tckbuildsrc/wink ]; then                
                 cd $HOME/tckdata/tckbuildsrc/wink
                 svn --non-interactive --accept theirs-full update
-                [ $? -ne 0 ] && exit 1
-                cd ..            
+                [ $? -ne 0 ] && exit 3
+                echo "" > wink_rev
+                echo "Update wink to latest!"
+                cd ..   
+            else
+                # target dir is not exist, so checkout
+                svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_CUR_REV
wink
+                [ $? -ne 0 ] && exit 3
+                echo "" > wink_rev
+                echo "Update wink to latest!"
             fi
         else
-            echo "wink's revision=$WINK_REV same as before!"
-        fi
-        
+            echo "wink's revision=$WINK_CUR_REV same as before!"
+        fi        
     fi
     
     # Update geronimo
     GERONIMO_PRE_REV=`cat geronimo_rev`
-    if [ -n "$GERONIMO_REV" ] && [ "$GERONIMO_REV" != "$GERONIMO_PRE_REV" ]; then
-        echo "$GERONIMO_REV" > geronimo_rev
+    if [ -n "$GERONIMO_CUR_REV" ] && [ "$GERONIMO_CUR_REV" != "$GERONIMO_PRE_REV"
]; then
+        
         [ -d $HOME/tckdata/tckbuildsrc/geronimo ] && rm -rf geronimo
-        svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_REV geronimo
-        [ $? -ne 0 ] && exit 1
-        echo "geronimo is checked out at revision $GERONIMO_REV!"
+        svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_CUR_REV geronimo
+        [ $? -ne 0 ] && exit 4
+        echo "$GERONIMO_CUR_REV" > geronimo_rev
+        echo "geronimo is checked out at revision $GERONIMO_CUR_REV!"
     else
-        if [ "$GERONIMO_REV" = "" ]; then
-            echo "" > geronimo_rev
-            if [ -d $HOME/tckdata/tckbuildsrc/geronimo ]; then
-                echo "Update geronimo to latest!"
+        if [ "$GERONIMO_CUR_REV" = "" ]; then            
+            if [ -d $HOME/tckdata/tckbuildsrc/geronimo ]; then                
                 cd $HOME/tckdata/tckbuildsrc/geronimo
                 svn --non-interactive --accept theirs-full update
-                [ $? -ne 0 ] && exit 1
+                [ $? -ne 0 ] && exit 4
+                echo "" > geronimo_rev
+                echo "Update geronimo to latest!"
                 cd ..
+            else
+                svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_CUR_REV
geronimo
+                [ $? -ne 0 ] && exit 4
+                echo "" > geronimo_rev
+                echo "Update geronimo to latest!"
             fi
         else
-            echo "geronimo's revision=$GERONIMO_REV same as before!"
+            echo "geronimo's revision=$GERONIMO_CUR_REV same as before!"
         fi
     fi
     
     # Update geronimotck
     GERONIMOTCK_PRE_REV=`cat geronimotck_rev`
-    if [ -n "$GERONIMOTCK_REV" ] && [ "$GERONIMOTCK_REV" != "$GERONIMOTCK_PRE_REV"
]; then
-        echo "$GERONIMOTCK_REV" > geronimotck_rev
+    if [ -n "$GERONIMOTCK_CUR_REV" ] && [ "$GERONIMOTCK_CUR_REV" != "$GERONIMOTCK_PRE_REV"
]; then        
         [ -d $HOME/tckdata/tckbuildsrc/geronimotck ] && rm -rf geronimotck
-        svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_REV
geronimotck
-        [ $? -ne 0 ] && exit 1
-        echo "geronimotck is checked out at revision $GERONIMOTCK_REV!"
+        svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_CUR_REV
geronimotck
+        [ $? -ne 0 ] && exit 5
+        echo "$GERONIMOTCK_CUR_REV" > geronimotck_rev
+        echo "geronimotck is checked out at revision $GERONIMOTCK_CUR_REV!"
     else
-        if [ "$GERONIMOTCK_REV" = "" ]; then
-            echo "" > geronimotck_rev
-            if [ -d $HOME/tckdata/tckbuildsrc/geronimotck ]; then
-                echo "Update geronimotck to latest!"
+        if [ "$GERONIMOTCK_CUR_REV" = "" ]; then            
+            if [ -d $HOME/tckdata/tckbuildsrc/geronimotck ]; then                
                 cd $HOME/tckdata/tckbuildsrc/geronimotck
                 svn --non-interactive --accept theirs-full update
-                [ $? -ne 0 ] && exit 1
+                [ $? -ne 0 ] && exit 5
+                echo "" > geronimotck_rev
+                echo "Update geronimotck to latest!"
                 cd ..
+            else
+                svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_CUR_REV
geronimotck
+                [ $? -ne 0 ] && exit 5
+                echo "" > geronimotck_rev
+                echo "Update geronimotck to latest!"
             fi
         else
-            echo "geronimotck's revision=$GERONIMOTCK_REV same as before!"           
-        fi
-        
-    fi
-    
+            echo "geronimotck's revision=$GERONIMOTCK_CUR_REV same as before!"          

+        fi        
+    fi    
 else
     # first time to create the folder
     mkdir -p $HOME/tckdata/tckbuildsrc
     cd $HOME/tckdata/tckbuildsrc
-    svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_REV openwebbeans
-    [ $? -ne 0 ] && exit 1
-    echo "$OWB_REV" > owb_rev
-    svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_REV openejb
-    [ $? -ne 0 ] && exit 1
-    echo "$OPENEJB_REV" > openejb_rev
-    svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_REV wink
-    [ $? -ne 0 ] && exit 1
-    echo "$WINK_REV" > wink_rev
-    svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_REV geronimo
-    [ $? -ne 0 ] && exit 1
-    echo "$GERONIMO_REV" > geronimo_rev
-    svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_REV
geronimotck
+    svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_CUR_REV openwebbeans
     [ $? -ne 0 ] && exit 1
-    echo "$GERONIMOTCK_REV" > geronimotck_rev
+    echo "$OWB_CUR_REV" > owb_rev
+    svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_CUR_REV openejb
+    [ $? -ne 0 ] && exit 2
+    echo "$OPENEJB_CUR_REV" > openejb_rev
+    svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_CUR_REV wink
+    [ $? -ne 0 ] && exit 3
+    echo "$WINK_CUR_REV" > wink_rev
+    svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_CUR_REV geronimo
+    [ $? -ne 0 ] && exit 4
+    echo "$GERONIMO_CUR_REV" > geronimo_rev
+    svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_CUR_REV
geronimotck
+    [ $? -ne 0 ] && exit 5
+    echo "$GERONIMOTCK_CUR_REV" > geronimotck_rev
 fi
 
 exit 0



Mime
View raw message