geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r420445 - in /geronimo/sandbox/svkmerge/m2migration: bootstrap build
Date Mon, 10 Jul 2006 06:59:00 GMT
Author: jdillon
Date: Sun Jul  9 23:58:59 2006
New Revision: 420445

URL: http://svn.apache.org/viewvc?rev=420445&view=rev
Log:
Create a {build|bootstrap}.log
Improve error handling slightly

Modified:
    geronimo/sandbox/svkmerge/m2migration/bootstrap
    geronimo/sandbox/svkmerge/m2migration/build

Modified: geronimo/sandbox/svkmerge/m2migration/bootstrap
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/bootstrap?rev=420445&r1=420444&r2=420445&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/bootstrap (original)
+++ geronimo/sandbox/svkmerge/m2migration/bootstrap Sun Jul  9 23:58:59 2006
@@ -15,12 +15,32 @@
     exit 1
 }
 
+now() {
+    date +'%H:%M:%S %Z %Y'
+}
+
+begin() {
+    warn "Starting bootstrap build..."
+}
+
+abort() {
+    die "Aborted ($startdate to `now`)"
+}
+
+complete() {
+    if [ "$1" == "0" ]; then
+        warn "Completed ($startdate to `now`)"
+    else
+        die "Failed ($startdate to `now`)"
+    fi
+}
+
 clean() {
     echo "Cleaning..."
     
     rm -rf ~/.m2/repository
     
-    find . -name target -type d -exec rm -rf \{\} \;
+    find "$DIRNAME" -name target -type d -exec rm -rf \{\} \;
 }
 
 stage() {
@@ -88,15 +108,19 @@
     )
 }
 
-clean
-
-genesis
-
-stage "bootstrap"
-
-thirdparty
-
-stage "assemble"
+main() {
+    startdate=`now`
+    
+    trap abort STOP KILL INT ABRT
+    
+    begin && (
+        clean && \
+        genesis && \
+        stage "bootstrap" && \
+        thirdparty && \
+        stage "assemble"
+    ) && complete $?
+}
 
-echo "Done"
+main | 2>&1 tee bootstrap.log
 

Modified: geronimo/sandbox/svkmerge/m2migration/build
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/build?rev=420445&r1=420444&r2=420445&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/build (original)
+++ geronimo/sandbox/svkmerge/m2migration/build Sun Jul  9 23:58:59 2006
@@ -35,16 +35,20 @@
     fi
 }
 
-startdate=`now`
+main() {
+    startdate=`now`
+    
+    trap abort STOP KILL INT ABRT
+    
+    (
+        begin && (
+            mvn -Dstage=bootstrap "$@" && \
+            mvn -Dstage=assemble "$@"
+        ) && complete $?
+    )
+    
+    exit 0
+}
 
-trap abort STOP KILL INT ABRT
-
-(
-    begin && (
-        mvn -Dstage=bootstrap "$@" && \
-        mvn -Dstage=assemble "$@"
-    ) && complete $?
-)
-
-exit 0
+main | 2>&1 tee build.log
 



Mime
View raw message