ClearCase-Argv

 view release on metacpan or  search on metacpan

examples/cleanuplf  view on Meta::CPAN

#!/usr/local/bin/perl -w

# Works only on UNIX, because of its using setview, and accessorily getpwuid
# both unimplemented on Windows

use strict;
use ClearCase::Argv;
use File::Basename;
use Getopt::Long;
use Cwd;
use vars qw($opt_help $vob $lrep %mrep @lmas %seen %ctview %nrview);

my $me = basename $0;

examples/cleanuplf  view on Meta::CPAN

  return 0;
}
GetOptions('help') or usage;
usage if $opt_help;
my $dir = getcwd;
$vob = $ct->des(['-s'], 'vob:.')->qx;
usage("The current directory is not in a vob") unless $vob;
usage("The current directory is not the vob lost+found")
  unless basename($dir) eq 'lost+found' and dirname($dir) eq $vob;
(my $owner = $ct->des([qw(-fmt %[owner]p)], 'vob:.')->qx) =~ s%^.*[/\\]%%;
usage("Not running as vob owner") unless $owner eq (getpwuid($<))[0];
$lrep = $ct->des([qw(-fmt %[replica_name]p)], 'vob:.')->qx;

while (1) {
  last if onepass;
}

print "Some objects are mastered locally, but checked out remotely: ",
  scalar @lmas, "\n" if @lmas;
if (%mrep) {
  print "Some objects mastered in remote replicas:\n";



( run in 0.337 second using v1.01-cache-2.11-cpan-8d75d55dd25 )