diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-12-02 19:18:25 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-12-02 19:18:25 +0000 |
commit | 8a7f38d6043f11efe954ff1c347ba502e22b8df0 (patch) | |
tree | 3a6a29b7695843e47ff3cb7a6e6e493dd58fb0bd /lib/sbin/checkout.pl | |
parent | c6951ca1da318efb2a901eb672384a5f96b7a422 (diff) |
Can now use this script to check out custom given thorn names and
arrangements, for all those "hidden" thorns.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1183 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/checkout.pl')
-rw-r--r-- | lib/sbin/checkout.pl | 70 |
1 files changed, 44 insertions, 26 deletions
diff --git a/lib/sbin/checkout.pl b/lib/sbin/checkout.pl index ec4166c3..d9afc881 100644 --- a/lib/sbin/checkout.pl +++ b/lib/sbin/checkout.pl @@ -70,7 +70,8 @@ sub get_arrangements print "$arrangement "; } - print "\n\nAvailable arrangements: \n"; + print "\n\nRepository: $repository\n"; + print "Arrangements listed in modules file: \n"; open(MODULES,"cvs -d $repository co -s | "); @@ -98,16 +99,27 @@ sub get_arrangements print "\n"; - print "Checkout arrangements [1-$count] : "; - + print "Checkout arrangements h)elp, q)uit, c)ustom, range [1-$count] : "; + # Goto target arrangement directory chdir arrangements || die "Could not find arrangements directory"; $range = <STDIN>; - if ($range =~ /^h/i) + if ($range =~ /^h/i) { &print_help(); } + elsif ($range =~ /^q/i) + { + print "\n\n"; + exit(0); + } + elsif ($range =~ /^c/i) + { + print "Arrangement required: "; + $arrname = <STDIN>; + &CheckOut($arrname,$repository); + } elsif ($range =~ /^\s*$/) { $range = "1-$count"; @@ -164,9 +176,9 @@ sub get_thorns $last_arr = $this_arr; } - print "\n\nAvailable thorns: \n"; + print "\n\nThorns listed in the modules file for $repository: \n"; - open(MODULES,"cvs -q co -s | "); + open(MODULES,"cvs -d $repository -q co -s | "); $count = 0; while(<MODULES>) @@ -192,7 +204,7 @@ sub get_thorns print "\n"; - print "Checkout thorns h)elp, q)uit, range [1-$count] : "; + print "Checkout thorns h)elp, q)uit, c)ustom, range [1-$count] : "; # Goto target arrangement directory chdir arrangements || die "Could not find arrangements directory\n"; @@ -202,27 +214,33 @@ sub get_thorns { &print_help(); } - elsif ($range =~ /^q$/) + elsif ($range =~ /^q$/i) { print "\n\n"; exit(0); } + elsif ($range =~ /^c/i) + { + print "Arrangement/Thorn required: "; + $thornname = <STDIN>; + &CheckOut($thornname,$repository); + } elsif ($range =~ /^\s*$/) { - $range = "1-$count"; + $range = "1-$count"; } while ($range =~/^([0-9]+(?:-[0-9]+)?),?/) { - $range = $'; - $1 =~ /^([0-9]*)(-[0-9]*)?$/; - $first = $1; - if (!$2) + $range = $'; + $1 =~ /^([0-9]*)(-[0-9]*)?$/; + $first = $1; + if (!$2) {$last=$1} - else - {$2=~/-([0-9]*)/; $last=$1} - - for ($i=$first; $i<$last+1; $i++) + else + {$2=~/-([0-9]*)/; $last=$1} + + for ($i=$first; $i<$last+1; $i++) { &CheckOut($name{$i},$repository); } @@ -249,16 +267,21 @@ sub get_applications # Put number of applications here $count = 5; - print "Checkout applications [1-$count] : "; - - # Goto target arrangement directory - chdir arrangements || die "Could not find arrangements directory\n"; + print "Checkout applications h)elp, q)uit, range [1-$count] : "; + + # Goto target arrangement directory + chdir arrangements || die "Could not find arrangements directory\n"; $range = <STDIN>; if ($range =~ /^h/i) { &print_help(); } + elsif ($range =~ /^q/i) + { + print "\n\n"; + exit(0); + } elsif ($range =~ /^\s*$/) { $range = "1-$count"; @@ -467,11 +490,6 @@ sub choose_repository chop($rep[2]); } - if ($dowhat !~ /^h/i) - { - print "Using repository $rep[$dowhat]\n"; - } - return $rep[$dowhat]; } |