You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2005/11/14 16:12:13 UTC

svn commit: r344143 - /tcl/websh/trunk/makedist

Author: ronnie
Date: Mon Nov 14 07:11:59 2005
New Revision: 344143

URL: http://svn.apache.org/viewcvs?rev=344143&view=rev
Log:
- allow to create dist from trunk
- access http repository (https not needed)
- added builds option to show available tagged builds

Modified:
    tcl/websh/trunk/makedist

Modified: tcl/websh/trunk/makedist
URL: http://svn.apache.org/viewcvs/tcl/websh/trunk/makedist?rev=344143&r1=344142&r2=344143&view=diff
==============================================================================
--- tcl/websh/trunk/makedist (original)
+++ tcl/websh/trunk/makedist Mon Nov 14 07:11:59 2005
@@ -6,11 +6,11 @@
 # \
 exec tclsh "$0" "$@"
 
-set repository "https://svn.apache.org/repos/asf/tcl/websh"
+set repository "http://svn.apache.org/repos/asf/tcl/websh"
 
 proc usage {} {
     global argv0
-    fatal "usage: $argv0 <build>\nwhere <build> is the name of a tagged build (e.g. 3.5.0)"
+    fatal "usage: $argv0 <build>\n  where <build> is the name of a tagged build (e.g. 3.5.0)\n  or trunk for the latest repository version\n  or builds for a list of available tagged builds"
 }
 
 proc fatal {msg} {
@@ -24,25 +24,44 @@
 
 # get build from command line
 set build [lindex $argv 0]
+if {"$build" == "trunk"} {
+    set trunk 1
+    append build "-[clock format [clock seconds] -format "%Y%m%d"]"
+} elseif {"$build" == "builds"} {
+    set builds ""
+    regsub -all "/" [exec svn list $repository/tags] "" builds
+    puts $builds
+    puts "trunk"
+    exit
+} else {
+    set trunk 0
+}
 
-# check whether build is valid
-puts "checking for build $build"
-
-if {[catch {
-    set svnlist [exec svn list $repository/tags]
-    if {![regexp "$build/" $svnlist]} {
-	fatal "build $build is not tagged"
-    }
-} msg]} {fatal $msg}
+if {!$trunk} {
+    # check whether build is valid
+    puts "checking for build $build"
+
+    if {[catch {
+	set svnlist [exec svn list $repository/tags]
+	if {![regexp "$build/" $svnlist]} {
+	    fatal "build $build is not tagged"
+	}
+    } msg]} {fatal $msg}
+}
 
 # checkout build in a temporary directory
 set tmpdir [pid].tmp
 file mkdir $tmpdir
 cd $tmpdir
 
-puts "checking out build $build in temporary directory"
+if {$trunk} {
+    puts "checking out trunk in temporary directory"
+    catch {exec svn co $repository/trunk websh-$build}
+} else {
+    puts "checking out build $build in temporary directory"
+    catch {exec svn co $repository/tags/$build websh-$build}
+}
 
-catch {exec svn co $repository/tags/$build websh-$build}
 if {![file exists websh-$build/README]} {
     cd ..
     fatal "checkout in directory $tmpdir failed"



---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org