#!perl
ClearCase::Argv->ipc;
ClearCase::Argv->autochomp;
my
$ct_file
= ClearCase::Argv->new(
'file'
);
my
$ct_desc
= ClearCase::Argv->new(
'desc'
, [
qw(-fmt %[type]p)
]);
my
$ct_chtype
= ClearCase::Argv->new(
'chtype'
, [
'-f'
]);
$ct_chtype
->attropts(\
@ARGV
);
$| = 1;
while
(<STDIN>) {
chomp
;
next
if
!(-f
$_
&& -f
"$_@\@/main/0"
);
next
if
m%\Q/lost+found/%;
my
$is
=
$ct_desc
->args(
$_
)->
qx;
my $should_be = (split /\s+/, $ct_file->
args(
$_
)->
qx)[1];
if (!$should_be || !$is)
{
warn
"Warning: missing value should_be=$should_be, is=$is\n"
;
next
;
}
next
if
$should_be
eq
$is
;
$ct_chtype
->args(
$should_be
,
$_
)->
system
;
}