@rem = 'Perl, ccperl read this as an array assignment & skip the goto
@echo off
@goto endofperl
@rem ';
#--------------------------------------------------------------------
# Perl Begin
#-------------------------------------------------------------------
$ct='cleartool';
if($#ARGV == -1) {
print "usage: $0 <view-tag> .../n";
exit(1);
}
for($viewcnt = 0; $viewcnt <= $#ARGV; $viewcnt++) {
$view = $ARGV[$viewcnt];
print "/$view = $view/n";
# Get view-information
@viewinfo = `$ct lsview -long $view`;
foreach $entry (@viewinfo) {
chop($entry);
if($entry =~ /View tag uuid:/) {
($uuid = $entry) =~ s/.*View tag uuid://i;
}
}
print "/$uuid = ...$uuid.../n";
# remove entries from vob's
@voblist = `$ct lsvob -short`;
$error='';
foreach $vob (@voblist) {
chop($vob);
system("$ct rmview -force -vob $vob -uuid $uuid");
}
# unregister view
print "Unregister View/n";
system("$ct unregister -view -uuid $uuid");
# remove view tag
print "Remove Tag/n";
system("$ct rmtag -view -all $view");
}
#--------------------------------------------------------------------
# Perl End
#--------------------------------------------------------------------
__END__
:endofperl
REM Call Perl either with ext. ".bat" or without ext. ".bat" and
REM either in the current directory or somewhere in the path
ccperl -e "$s = shift;$c = $s =~ /.bat$/? $s : $s.'.bat';$p = (-x $c)? '' : ' -S '; system('ccperl'.$p.$c.' '.join(' ',@ARGV));exit $?;" %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
pause
@echo off
@goto endofperl
@rem ';
#--------------------------------------------------------------------
# Perl Begin
#-------------------------------------------------------------------
$ct='cleartool';
if($#ARGV == -1) {
print "usage: $0 <view-tag> .../n";
exit(1);
}
for($viewcnt = 0; $viewcnt <= $#ARGV; $viewcnt++) {
$view = $ARGV[$viewcnt];
print "/$view = $view/n";
# Get view-information
@viewinfo = `$ct lsview -long $view`;
foreach $entry (@viewinfo) {
chop($entry);
if($entry =~ /View tag uuid:/) {
($uuid = $entry) =~ s/.*View tag uuid://i;
}
}
print "/$uuid = ...$uuid.../n";
# remove entries from vob's
@voblist = `$ct lsvob -short`;
$error='';
foreach $vob (@voblist) {
chop($vob);
system("$ct rmview -force -vob $vob -uuid $uuid");
}
# unregister view
print "Unregister View/n";
system("$ct unregister -view -uuid $uuid");
# remove view tag
print "Remove Tag/n";
system("$ct rmtag -view -all $view");
}
#--------------------------------------------------------------------
# Perl End
#--------------------------------------------------------------------
__END__
:endofperl
REM Call Perl either with ext. ".bat" or without ext. ".bat" and
REM either in the current directory or somewhere in the path
ccperl -e "$s = shift;$c = $s =~ /.bat$/? $s : $s.'.bat';$p = (-x $c)? '' : ' -S '; system('ccperl'.$p.$c.' '.join(' ',@ARGV));exit $?;" %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
pause