Changeset 2633
- Timestamp:
- Dec 4, 2004, 1:19:54 AM (22 years ago)
- Location:
- trunk/Ohana/etc
- Files:
-
- 1 added
- 1 edited
-
distributions.txt (added)
-
mkdist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/etc/mkdist
r2631 r2633 1 #!/ bin/csh -f1 #!/usr/bin/env perl 2 2 3 cvs co base 3 $dist = "distributions.txt"; 4 4 5 cvs co -r libdummy-1-0 libdummy 6 cvs co -r libohana-1-0 libohana 7 cvs co -r libfits-1-0 libfits 5 if (@ARGV != 2) { die "USAGE: mkdist (group) (version)\n"; } 8 6 9 cvs co -r kapa-1-0 kapa 10 cvs co -r kii-1-0 kii 7 open (FILE, $dist) || die "ERROR: can't open distribution file\n"; 8 @list = <FILE>; 9 close (FILE); 11 10 12 cvs co opihi.v2 11 $group = $ARGV[0]; 12 $version = $ARGV[1]; 13 14 $ingroup = 0; 15 @name = (); 16 @tag = (); 17 18 foreach $line (@list) { 19 20 ($key) = split (" ", $line); 21 22 # found DISTRIBUTION 23 if ($key eq "DISTRIBUTION") { 24 ($tmp, $word1, $word2) = split (" ", $line); 25 if (($word1 eq $group) && ($word2 eq $version)) { $ingroup = 1; } 26 } 27 if (!$ingroup) { next; } 28 29 # found END 30 if ($key eq "END") { last; } 31 32 # found USE 33 if ($key eq "USE") { 34 ($tmp, $word1, $word2) = split (" ", $line); 35 if ($word2 eq "") { 36 $tag = ""; 37 $name = $word1; 38 } else { 39 $tag = $word1; 40 $name = $word2; 41 } 42 if ($name eq "") { die "missing tag\n"; } 43 push @name, $name; 44 push @tag, $tag; 45 } 46 } 47 48 if (@name == 0) { die "ERROR: $group $version not found\n"; } 49 50 for ($i = 0; $i < @name; $i++) { 51 if ($tag[$i] eq "") { 52 &vsystem ("cvs co $name[$i]"); 53 } else { 54 &vsystem ("cvs co -r $tag[$i] $name[$i]"); 55 } 56 } 57 58 &vsystem ("mv ohana $group-$version"); 59 60 sub vsystem { 61 print STDERR "@_\n"; 62 $status = system ("@_"); 63 $status; 64 } 65
Note:
See TracChangeset
for help on using the changeset viewer.
