diff options
author | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-24 17:39:00 +0000 |
---|---|---|
committer | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-24 17:39:00 +0000 |
commit | 1bb4ed5e19cfe5b5185766f1ff6018687ba23d54 (patch) | |
tree | 54a0045cc7ba2bbb3cce0aa790febedec2fbfd35 /src | |
parent | 0a8ba0dee24558b9bd4ccfcd839ce9aacfaf2c55 (diff) |
BUILD : 1.7.5 (332) BUGS : none NOTES : Added -l option to am script to list possible selectors and fixed destination directory guessing for tags.
git-svn-id: svn://svn.anope.org/anope/trunk@332 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@208 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rwxr-xr-x | src/bin/am | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/src/bin/am b/src/bin/am index 3c4cd04c8..c8e693b2e 100755 --- a/src/bin/am +++ b/src/bin/am @@ -97,11 +97,12 @@ sub usage() # --create-branch to create a branch # --create-tag to create a tag # --switch to switch between branches/tags - print "Usage: $0 <-g | -p | -f> [-r revision | -b branch | -t tag | -P proto] <destination>\n"; + print "Usage: $0 <-g | -p | -f | -l> [-r revision | -b branch | -t tag | -P proto] <destination>\n"; print " Operations:\n"; print " -g Get Operation\n"; print " -p Put Operation\n"; print " -f[tar|diff] FTP Operation, retrieve latest tar or diff\n"; + print " -l List Operation, for valid selector options\n"; print " Selector:\n"; print " -r revision Retrieve by revision number\n"; print " -b branch Retrieve by branch name\n"; @@ -148,6 +149,47 @@ sub find_conflict() { return $retval; } +sub do_lst() { + my $out; + print "*** BRANCHES:\n"; + print "trunk (DEFAULT)\n"; + open (IN, "$svn list $svnroot/branches|"); + while (<IN>) { + if (! /proto/) { + $out="$_"; + $out =~ s/\/$//; + print "$out"; + } + } + close(IN); + + print "\n*** PROTOTYPES:\n"; + open (IN, "$svn list $svnroot/branches/proto|"); + while (<IN>) { + $out="$_"; + $out =~ s/\/$//; + chomp($out); + if (/bahamut18/) { + $out .= "\t(OBSOLETE)"; + } elsif (/capab/) { + $out .= "\t(OBSOLETE)"; + } + print "$out\n"; + } + close(IN); + + print "\n*** TAGS:\n"; + open (IN, "$svn list $svnroot/tags|"); + while (<IN>) { + $out="$_"; + $out =~ s/\/$//; + print "$out"; + } + close(IN); + print "\n"; + +} + sub do_ftp() { my $ftpc; @@ -178,14 +220,13 @@ sub do_get() { $copy = $copy . "-$rev"; } elsif ($tag) { $selector = "tags/$tag"; - $copy = $copy . "-$tag"; + $copy = "$tag"; } elsif ($branch) { $selector = "branches/$branch"; $copy = $copy . "-$branch"; } elsif ($proto) { $selector = "branches/proto/$proto"; $copy = "$proto"; - print "PROT: $proto SEL: $selector COPY: $copy\n"; } else { $selector = "trunk"; } @@ -406,15 +447,18 @@ NOTES : "; } { - usage() if (! @ARGV); + usage() if (! @ARGV); - my $opt = 'hgpf:r:b:t:P:'; + my $opt = 'hgplf:r:b:t:P:'; getopts ("$opt", \%opt) or usage(); - usage() if $opt{h}; + usage() if $opt{h}; usage() if ($opt{g} && $opt{p}); usage() if ($opt{g} && $opt{f}); + usage() if ($opt{g} && $opt{l}); usage() if ($opt{p} && $opt{f}); + usage() if ($opt{p} && $opt{l}); + usage() if ($opt{f} && $opt{l}); usage() if ($opt{r} && $opt{b}); usage() if ($opt{r} && $opt{t}); usage() if ($opt{b} && $opt{t}); @@ -435,6 +479,7 @@ NOTES : "; } } + do_lst() if $opt{l}; do_ftp() if $opt{f}; do_get() if $opt{g}; do_put() if $opt{p}; |