summaryrefslogtreecommitdiff
path: root/lib/sbin/checkout.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-27 12:06:21 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-27 12:06:21 +0000
commitc2ff271bbabcdfd6081eca6cac76fa19cb89c45a (patch)
tree3b0334147d0e22aeabf3e118ed2530afe98f20f1 /lib/sbin/checkout.pl
parente687267004308386010fbc124834d352fde0e03e (diff)
Added applications to
gmake checkout for now the F77 and F90 versions of WaveToy. git-svn-id: http://svn.cactuscode.org/flesh/trunk@796 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/checkout.pl')
-rw-r--r--lib/sbin/checkout.pl101
1 files changed, 96 insertions, 5 deletions
diff --git a/lib/sbin/checkout.pl b/lib/sbin/checkout.pl
index fd213bd0..6dcacb83 100644
--- a/lib/sbin/checkout.pl
+++ b/lib/sbin/checkout.pl
@@ -8,7 +8,7 @@ print "\n";
print "Type \"help\" at any prompt for a description on how\nto use this script\n\n";
-print "Checkout packages or thorns? [packages] : ";
+print "Checkout applications, packages or thorns? [packages] : ";
$which = <STDIN>;
@@ -20,14 +20,18 @@ elsif ($which =~ /^t/i)
{
&get_thorns();
}
+elsif ($which =~ /^a/i)
+{
+ &get_applications();
+}
else
{
&get_packages();
}
-print "\nQuit or checkout more packages or thorns [quit] : ";
+print "\nQuit or checkout more applications, packages or thorns [quit] : ";
$dowhat = <STDIN>;
-if ($dowhat !~ /^t/i && $dowhat !~/^p/i && $dowhat !~ /^h/i)
+if ($dowhat !~ /^[tpah]/i )
{
print "All done!\n";
exit;
@@ -44,15 +48,19 @@ while ()
{
&get_thorns();
}
+ elsif ($dowhat =~ /^a/i)
+ {
+ &get_applications();
+ }
else
{
&get_packages();
}
- print "\nQuit or checkout more packages or thorns [quit] : ";
+ print "\nQuit or checkout more applications, packages or thorns [quit] : ";
$dowhat = <STDIN>;
- if ($dowhat !~ /^t/i && $dowhat !~/^p/i && $dowhat !~ /^h/i)
+ if ($dowhat !~ /^[thpa]/)
{
print "All done!\n";
exit;
@@ -187,6 +195,89 @@ sub get_thorns
chdir ("..") || die "Could not return to Cactus home directory\n";
}
+
+
+
+sub get_applications
+{
+ print "\nAvailable applications: \n";
+ print " [1] Example F90 wave equation evolver\n";
+ print " [2] Example F77 wave equation evolver\n";
+ print "\n";
+
+ # Put number of applications here
+ $count = 2;
+
+ print "Checkout applications [1-$count] : ";
+
+ # Goto target package directory
+ chdir packages || die "Could not find packages directory\n";
+
+ $range = <STDIN>;
+ if ($range =~ /^h/i)
+ {
+ &print_help();
+ }
+ elsif ($range =~ /^\s*$/)
+ {
+ $range = "1-$count";
+ }
+
+ 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++)
+ {
+ if ($i == 1)
+ {
+ # Checkout F90 WaveToy
+ print("\n");
+ print("Checking out WaveToy\n");
+ system("cvs -q checkout CactusApplications/WaveToy");
+ print("Checking out Boundary\n");
+ system("cvs -q checkout CactusBase/Boundary");
+ print("Checking out CartGrid3D\n");
+ system("cvs -q checkout CactusBase/CartGrid3D");
+ print("Checking out IOUtil\n");
+ system("cvs -q checkout CactusBase/IOUtil");
+ print("Checking out IOASCII\n");
+ system("cvs -q checkout CactusPUGH/IOASCII");
+ print("Checking out PUGH\n");
+ system("cvs -q checkout CactusPUGH/PUGH");
+ print("Completed checkout of application Wave F90\n");
+ }
+ elsif ($i == 2)
+ {
+ # Checkout F77 WaveToy
+ print("\n");
+ print("Checking out WaveToyF77\n");
+ system("cvs -q checkout CactusApplications/WaveToyF77");
+ print("Checking out Boundary\n");
+ system("cvs -q checkout CactusBase/Boundary");
+ print("Checking out CartGrid3D\n");
+ system("cvs -q checkout CactusBase/CartGrid3D");
+ print("Checking out IOUtil\n");
+ system("cvs -q checkout CactusBase/IOUtil");
+ print("Checking out IOASCII\n");
+ system("cvs -q checkout CactusPUGH/IOASCII");
+ print("Checking out PUGH\n");
+ system("cvs -q checkout CactusPUGH/PUGH");
+ print("Completed checkout of application Wave F77\n");
+ }
+ }
+ }
+
+ chdir ("..") || die "Could not return to Cactus home directory\n";
+}
+
sub print_help
{