Fix for throbber blocker -- mixed up override and non-override case in make-jars.pl. Also fix for os/2 problem -- can't call utime on open file. Also removed extra CRs from die cmds. r=ssu,mkaply@us.ibm.com,fosterd@hartwick.edu

This commit is contained in:
warren%netscape.com 2000-09-22 00:31:58 +00:00
Родитель 9fe36a8410
Коммит 186f7bd6a8
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -28,6 +28,7 @@ if (open(FILE, "<$installedChromeFile")) {
if ($_ =~ $line) {
# line already appears in installed-chrome.txt file
# just update the mod date
close(FILE) || die "error: can't close $installedChromeFile: $!";
my $now = time;
utime($now, $now, $installedChromeFile) || die "couldn't touch $installedChromeFile";
print "+++ updating chrome $installedChromeFile\n+++\t$line\n";

Просмотреть файл

@ -48,7 +48,7 @@ sub zipErrorCheck($)
{
my ($err) = @_;
return if ($err == 0 || $err == 12);
die ("Error invoking zip: $err\n");
die ("Error invoking zip: $err");
}
sub JarIt
@ -142,13 +142,13 @@ sub EnsureFileInDir
}
if (!-e $file) {
die "error: file '$file' doesn't exist\n";
die "error: file '$file' doesn't exist";
}
if (!-e $dir) {
mkpath($dir, 0, 0775) || die "can't mkpath $dir: $!\n";
mkpath($dir, 0, 0775) || die "can't mkpath $dir: $!";
}
unlink $destPath; # in case we had a symlink on unix
copy($file, $destPath) || die "copy($file, $destPath) failed: $!\n";
copy($file, $destPath) || die "copy($file, $destPath) failed: $!";
# fix the mod date so we don't jar everything (is this faster than just jarring everything?)
my $atime = stat($file)->atime || die $!;
@ -173,12 +173,12 @@ while (<STDIN>) {
if (/^\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
my $dest = $1;
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1);
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0);
$args = "$args$dest ";
} elsif (/^\+\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
my $dest = $1;
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0);
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1);
$overrides = "$overrides$dest ";
} elsif (/^\s*$/) {
# end with blank line