IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2633


Ignore:
Timestamp:
Dec 4, 2004, 1:19:54 AM (22 years ago)
Author:
eugene
Message:

distribution code

Location:
trunk/Ohana/etc
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/etc/mkdist

    r2631 r2633  
    1 #!/bin/csh -f
     1#!/usr/bin/env perl
    22
    3 cvs co base
     3$dist = "distributions.txt";
    44
    5 cvs co -r libdummy-1-0 libdummy
    6 cvs co -r libohana-1-0 libohana
    7 cvs co -r libfits-1-0 libfits
     5if (@ARGV != 2) { die "USAGE: mkdist (group) (version)\n"; }
    86
    9 cvs co -r kapa-1-0 kapa
    10 cvs co -r kii-1-0 kii
     7open (FILE, $dist) || die "ERROR: can't open distribution file\n";
     8@list = <FILE>;
     9close (FILE);
    1110
    12 cvs co opihi.v2
     11$group = $ARGV[0];
     12$version = $ARGV[1];
     13
     14$ingroup = 0;
     15@name = ();
     16@tag = ();
     17
     18foreach $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
     48if (@name == 0) { die "ERROR: $group $version not found\n"; }
     49
     50for ($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
     60sub vsystem {
     61    print STDERR "@_\n";
     62    $status = system ("@_");
     63    $status;
     64}
     65
Note: See TracChangeset for help on using the changeset viewer.