$Is_MacOS,$Is_VMS,
$Debug,$Verbose,$Quiet,$MANIFEST,$found,$DEFAULT_MSKIP);
-$VERSION = substr(q$Revision: 1.33 $, 10);
+$VERSION = substr(q$Revision: 1.35 $, 10);
@ISA=('Exporter');
@EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck',
'skipcheck', 'maniread', 'manicopy');
sub mkmanifest {
my $manimiss = 0;
- my $read = maniread() or $manimiss++;
+ my $read = (-r 'MANIFEST' && maniread()) or $manimiss++;
$read = {} if $manimiss;
local *M;
rename $MANIFEST, "$MANIFEST.bak" unless $manimiss;
$name =~ s/^:([^:]+)$/$1/ if $Is_MacOS;
warn "Debug: diskfile $name\n" if $Debug;
$name =~ s#(.*)\.$#\L$1# if $Is_VMS;
+ $name = uc($name) if /^MANIFEST/i && $Is_VMS;
$found->{$name} = "";}, $Is_MacOS ? ":" : ".");
$found;
}
while (<M>){
chomp;
next if /^#/;
+
+ my($file, $comment) = /^(\S+)\s*(.*)/;
+ next unless $file;
+
if ($Is_MacOS) {
- my($item,$text) = /^(\S+)\s*(.*)/;
- $item = _macify($item);
- $item =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
- $read->{$item}=$text;
+ $file = _macify($file);
+ $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
}
elsif ($Is_VMS) {
- my($file)= /^(\S+)/;
- next unless $file;
my($base,$dir) = File::Basename::fileparse($file);
# Resolve illegal file specifications in the same way as tar
$dir =~ tr/./_/;
if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); }
my $okfile = "$dir$base";
warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
- $read->{"\L$okfile"}=$_;
+ $file = $okfile;
+ $file = lc($file) unless $file =~ /^MANIFEST/i;
}
- else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; }
+
+ $read->{$file} = $comment;
}
close M;
$read;