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:
alecf%netscape.com 2002-04-01 04:43:40 +00:00
Родитель c455d29a91
Коммит aff39b0295
3 изменённых файлов: 14 добавлений и 4 удалений

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

@ -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