32 lines
428 B
Plaintext
32 lines
428 B
Plaintext
|
#!/usr/bin/perl
|
||
|
|
||
|
$fileNum = 0;
|
||
|
while(<>)
|
||
|
{
|
||
|
/^([VDTB])(\S*)\s+(.*)/ || die("Bad filelist, line $.");
|
||
|
($type, $options, $name) = ($1, $2, $3);
|
||
|
|
||
|
if ($type eq "D")
|
||
|
{
|
||
|
$dir = $name;
|
||
|
print "D $dir\n";
|
||
|
}
|
||
|
elsif ($type eq "V")
|
||
|
{
|
||
|
# Do nothing
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$fileNum++;
|
||
|
$tail = $name;
|
||
|
$tail =~ s|^.*/||;
|
||
|
die("Bad filelist, line $.") if $name ne $dir . $tail;
|
||
|
print "$fileNum $tail\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#
|
||
|
# vi: ai ts=4
|
||
|
# vim: si
|
||
|
#
|