зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug 132946
r=cls, r=pinkerton, a=asa fix up packaging scripts so they can run from any directory move from perl's "use" which is compile-time to require/import which are run-time, so that we can use the FindBin package. also fix a typo which allows mozLock.pm to recognize windows paths
This commit is contained in:
Родитель
c455d29a91
Коммит
aff39b0295
|
@ -2,6 +2,10 @@
|
|||
|
||||
# make-jars [-f] [-v] [-l] [-d <chromeDir>] [-s <srcdir>] < <jar.mn>
|
||||
|
||||
# we'll be pulling in some stuff from the script directory
|
||||
use FindBin;
|
||||
push @INC, $FindBin::Bin;
|
||||
|
||||
use strict;
|
||||
|
||||
use Getopt::Std;
|
||||
|
@ -12,7 +16,8 @@ use Cwd;
|
|||
use File::Copy;
|
||||
use File::Path;
|
||||
use IO::File;
|
||||
use mozLock;
|
||||
require mozLock;
|
||||
import mozLock;
|
||||
|
||||
my $objdir = getcwd;
|
||||
|
||||
|
@ -154,7 +159,7 @@ sub RegIt
|
|||
{
|
||||
my ($chromeDir, $jarFileName, $chromeType, $pkgName) = @_;\
|
||||
chop($pkgName) if ($pkgName =~ m/\/$/);
|
||||
#print "RegIt: $jarFileName, $chromeType, $pkgName\n";
|
||||
#print "RegIt: $chromeDir, $jarFileName, $chromeType, $pkgName\n";
|
||||
|
||||
my $line;
|
||||
if ($fileformat eq "flat") {
|
||||
|
|
|
@ -52,7 +52,7 @@ sub priv_abspath($) {
|
|||
$file =~ s/\\/\//g;
|
||||
|
||||
# Check if file is already absolute
|
||||
if ($file =~ m/^\// || substr($file, 1, 0) eq ':') {
|
||||
if ($file =~ m/^\// || substr($file, 1, 1) eq ':') {
|
||||
return $file;
|
||||
}
|
||||
$out = cwd . "/$file";
|
||||
|
|
|
@ -3,8 +3,13 @@
|
|||
#################################################################
|
||||
# Rest of program
|
||||
|
||||
# get requirements from the same dir as the script
|
||||
use FindBin;
|
||||
push @INC, $FindBin::Bin;
|
||||
|
||||
require GenerateManifest;
|
||||
import GenerateManifest;
|
||||
use Getopt::Long;
|
||||
use GenerateManifest;
|
||||
|
||||
# Configuration
|
||||
$win32 = ($^O eq "MSWin32") ? 1 : 0; # ActiveState Perl
|
||||
|
|
Загрузка…
Ссылка в новой задаче