diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-03 16:32:35 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-03 16:32:35 +0000 |
commit | 44d46a97a5b036fc2b5c7a277935633b0231ecce (patch) | |
tree | 64a1b015e1344dee76ed367520e4071a0c701032 /arrangements | |
parent | 50ac085e0ea0565f89ef2e82b1a5ce054b48f64c (diff) |
This file is moving to lib/sbin
git-svn-id: http://svn.cactuscode.org/flesh/trunk@624 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'arrangements')
-rw-r--r-- | arrangements/checkout.pl | 173 |
1 files changed, 0 insertions, 173 deletions
diff --git a/arrangements/checkout.pl b/arrangements/checkout.pl deleted file mode 100644 index 1b06ae86..00000000 --- a/arrangements/checkout.pl +++ /dev/null @@ -1,173 +0,0 @@ -# /usr/bin/perl -s - -print "\n"; - - - print "Checkout packages or thorns? [packages] : "; - - $which = <STDIN>; - - if ($which =~ /^t/i) - { - &get_thorns(); - } - else - { - &get_packages(); - } - -print "\nQuit or checkout more packages or thorns [quit] : "; -$dowhat = <STDIN>; -print $dowhat; -if ($dowhat !~ /^t/i && $dowhat !~/^p/i) -{ - print "All done!\n"; - exit; -} - -$doit = 1; -while () -{ - - if ($dowhat =~ /^t/i) - { - &get_thorns(); - } - else - { - &get_packages(); - } - - print "\nQuit or checkout more packages or thorns [quit] : "; - - $dowhat = <STDIN>; - if ($dowhat !~ /^t/i && $dowhat !~/^p/i) - { - print "All done!\n"; - exit; - } -} - -sub get_packages -{ - - -print "\nYou already have packages: \n"; - -open(HAVE,"find . -type d -maxdepth 1 |"); -while (<HAVE>) -{ - if (!/^\.\/CVS$/ && !/^\.$/) - { - /\.\/(.*)/; - print " $1\n"; - } -} - -print "\nAvailable packages: \n"; - -open(MODULES,"cvs co -s | "); - -$count = 0; -while(<MODULES>) -{ - if (/(\w*)\s*PACKAGE/) - { - $count++; - $name{$count} = $1; - } -} - - -for ($i=1; $i<$count+1;$i++) -{ - print " [$i] $name{$i}\n"; -} - -print "\n"; - -print "Checkout packages [1-$count] : "; - -$range = <STDIN>; - -while ($range =~/^([0-9]+(?:-[0-9]+)?),?/) -{ - $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++) - { - system("cvs checkout $name{$i}"); - } - -} -} - - - -sub get_thorns -{ - - -print "\nYou already have thorns: \n"; - -open(HAVE,"find . -type d -maxdepth 2 |"); -while (<HAVE>) -{ - if (!/CVS$/ && /\.\/\w*\/\w*$/) - { - /\.\/(.*)/; - print " $1\n"; - } -} - -print "\nAvailable thorns: \n"; - -open(MODULES,"cvs -q co -s | "); - -$count = 0; -while(<MODULES>) -{ - if (/(\w*\/?\w*)\s*THORN/) - { - $count++; - $name{$count} = $1; - } -} - - -for ($i=1; $i<$count+1;$i++) -{ - print " [$i] $name{$i}\n"; -} - -print "\n"; - -print "Checkout thorns [1-$count] : "; - -$range = <STDIN>; - -while ($range =~/^([0-9]+(?:-[0-9]+)?),?/) -{ - $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++) - { - system("cvs -q checkout $name{$i}"); - } - -} -} - - |