#! /usr/local/bin/perl
if ($ARGV[0] && "install" =~ /^$ARGV[0]/) {
    shift;
    $install = "-f Distfile";
    @install = $install =~ split;
}
foreach (@ARGV) {
    $hosts .= " $_";
    /^kc$/i && (push(@stamps, ".stamp.kc"), next);
    /^wwu$/i && (push(@stamps, ".stamp.wwu"), next);
    /^cs$/i && (push(@stamps, ".stamp.cs"), next);
}
if ($install && ! $hosts) {
    push(@stamps, ".stamp.wwu");
    push(@stamps, ".stamp.cs");
    push(@stamps, ".stamp.kc");
}
print $install ? "install" : "dist", "$hosts\n";
foreach (@stamps) {
    do {
    	print "Creating $_\n";
        open(STAMP, ">$_");
        close STAMP;
        utime 0, 0, "$_";
    } if $install && ! -e "$_";
}
system("rdist", @install, @ARGV);
$now = time;
