geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1086832 - /geronimo/sandbox/forrest/tck/svnupdate.sh
Date Wed, 30 Mar 2011 04:08:11 GMT
Author: xiaming
Date: Wed Mar 30 04:08:11 2011
New Revision: 1086832

URL: http://svn.apache.org/viewvc?rev=1086832&view=rev
Log:
A script to do svn operation according to specified revision

Added:
    geronimo/sandbox/forrest/tck/svnupdate.sh   (with props)

Added: geronimo/sandbox/forrest/tck/svnupdate.sh
URL: http://svn.apache.org/viewvc/geronimo/sandbox/forrest/tck/svnupdate.sh?rev=1086832&view=auto
==============================================================================
--- geronimo/sandbox/forrest/tck/svnupdate.sh (added)
+++ geronimo/sandbox/forrest/tck/svnupdate.sh Wed Mar 30 04:08:11 2011
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+OWB_REV=$OWB_REV
+OPENEJB_REV=$OPENEJB_REV
+WINK_REV=$WINK_REV
+GERONIMO_REV=$GERONIMO_REV
+GERONIMOTCK_REV=$GERONIMOTCK_REV
+
+if [ -d $HOME/tckdata/tckbuildsrc ]; then
+    # enter the working directory
+    cd $HOME/tckdata/tckbuildsrc
+    
+    # Update openwebbeans    
+    OWB_PRE_REV=`cat owb_rev`
+    if [ -n "$OWB_REV" ] && [ "$OWB_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
+        [ -d $HOME/tckdata/tckbuildsrc/openwebbeans ] && rm -rf openwebbeans
+        svn co https://svn.apache.org/repos/asf/openwebbeans/trunk@$OWB_REV openwebbeans
+        echo "Openwebbeans is checked out at revision $OWB_REV!"
+    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!"
+                cd $HOME/tckdata/tckbuildsrc/openwebbeans
+                svn --non-interactive --accept theirs-full update
+                cd ..            
+            fi
+        else
+            echo "owb's revision=$OWB_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
+        [ -d $HOME/tckdata/tckbuildsrc/openejb ] && rm -rf openejb
+        svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_REV openejb
+        echo "Openejb is checked out at revision $OPENEJB_REV!"
+    else
+        if [ "$OPENEJB_REV" = "" ]; then
+            echo "" > openejb_rev
+            if [ -d $HOME/tckdata/tckbuildsrc/openejb ]; then
+                echo "Update openejb to latest!"
+                cd $HOME/tckdata/tckbuildsrc/openejb
+                svn --non-interactive --accept theirs-full update
+                cd ..            
+            fi
+        else
+            echo "openejb's revision=$OPENEJB_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
+        [ -d $HOME/tckdata/tckbuildsrc/wink ] && rm -rf wink
+        svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_REV wink
+        echo "wink is checked out at revision $WINK_REV!"
+    else
+        if [ "$WINK_REV" = "" ]; then
+            echo "" > wink_rev
+            if [ -d $HOME/tckdata/tckbuildsrc/wink ]; then
+                echo "Update wink to latest!"
+                cd $HOME/tckdata/tckbuildsrc/wink
+                svn --non-interactive --accept theirs-full update
+                cd ..            
+            fi
+        else
+            echo "wink's revision=$WINK_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
+        [ -d $HOME/tckdata/tckbuildsrc/geronimo ] && rm -rf geronimo
+        svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_REV geronimo
+        echo "geronimo is checked out at revision $GERONIMO_REV!"
+    else
+        if [ "$GERONIMO_REV" = "" ]; then
+            echo "" > geronimo_rev
+            if [ -d $HOME/tckdata/tckbuildsrc/geronimo ]; then
+                echo "Update geronimo to latest!"
+                cd $HOME/tckdata/tckbuildsrc/geronimo
+                svn --non-interactive --accept theirs-full update
+                cd ..
+            fi
+        else
+            echo "geronimo's revision=$GERONIMO_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
+        [ -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
+        echo "geronimotck is checked out at revision $GERONIMOTCK_REV!"
+    else
+        if [ "$GERONIMOTCK_REV" = "" ]; then
+            echo "" > geronimotck_rev
+            if [ -d $HOME/tckdata/tckbuildsrc/geronimotck ]; then
+                echo "Update geronimotck to latest!"
+                cd $HOME/tckdata/tckbuildsrc/geronimotck
+                svn --non-interactive --accept theirs-full update
+                cd ..
+            fi
+        else
+            echo "geronimotck's revision=$GERONIMOTCK_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
+    echo "$OWB_REV" > owb_rev
+    svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3@$OPENEJB_REV openejb
+    echo "$OPENEJB_REV" > openejb_rev
+    svn co https://svn.apache.org/repos/asf/incubator/wink/trunk@$WINK_REV wink
+    echo "$WINK_REV" > wink_rev
+    svn co https://svn.apache.org/repos/asf/geronimo/server/trunk@$GERONIMO_REV geronimo
+    echo "$GERONIMO_REV" > geronimo_rev
+    svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/3.0@$GERONIMOTCK_REV
geronimotck
+    echo "$GERONIMOTCK_REV" > geronimotck_rev
+fi
+
+#if [ -d $HOME/tckdata/tckbuildsrc ]
+#then
+#    cd $HOME/tckdata/tckbuildsrc
+#    SRCLIST=`ls -d */`
+#    for srcfolder in $SRCLIST
+#    do      
+#      echo "Update source folder $srcfolder"
+#      cd $srcfolder
+#      svn cleanup
+#      svn --non-interactive --accept theirs-full update
+#      cd ..
+#    done
+#    echo "Source is updated!"
+#fi 
+
+

Propchange: geronimo/sandbox/forrest/tck/svnupdate.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/forrest/tck/svnupdate.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/sandbox/forrest/tck/svnupdate.sh
------------------------------------------------------------------------------
    svn:keywords = Date Revision



Mime
View raw message