diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-18 07:42:15 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-18 07:42:15 +0000 |
commit | d28972a69f27143175e25fdc40ebfabd56081a83 (patch) | |
tree | ece6ebb69608bb8310314e7dc87d69285f4317f0 /solenv | |
parent | d8def3f27e66a803659944d500566f1bfb1996e4 (diff) |
INTEGRATION: CWS nativefixer1 (1.2.102); FILE MERGED
2004/11/02 11:41:49 is 1.2.102.2: #118240# parameter -i to ignore errors
2004/10/26 10:42:59 is 1.2.102.1: #118240# parallel packing process
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/packager/check.pm | 40 | ||||
-rw-r--r-- | solenv/bin/modules/packager/globals.pm | 21 |
2 files changed, 55 insertions, 6 deletions
diff --git a/solenv/bin/modules/packager/check.pm b/solenv/bin/modules/packager/check.pm index 8010c5302e6a..215abf91e5f8 100644 --- a/solenv/bin/modules/packager/check.pm +++ b/solenv/bin/modules/packager/check.pm @@ -2,9 +2,9 @@ # # $RCSfile: check.pm,v $ # -# $Revision: 1.2 $ +# $Revision: 1.3 $ # -# last change: $Author: kz $ $Date: 2004-06-11 18:20:45 $ +# last change: $Author: obo $ $Date: 2004-11-18 08:41:19 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -62,6 +62,7 @@ package packager::check; +use packager::exiter; use packager::globals; ############################################## @@ -70,9 +71,13 @@ use packager::globals; sub check_packlist { + my $projectdir = $ENV{'PRJ'}; + $projectdir =~ s/$packager::globals::separator\s*$//; + $packager::globals::packlistname = $projectdir . $packager::globals::separator . "util" . $packager::globals::separator . $packager::globals::packlistname; + if ( ! -f $packager::globals::packlistname ) { - print "\nERROR: Cannot find pack list: $packager::globals::packlistname\n"; + packager::exiter::exit_program("ERROR: Package list not found: $packager::globals::packlistname", "check_packlist"); } } @@ -84,7 +89,34 @@ sub check_environment { if ( ! $ENV{'OUTPATH'} ) { - print "\nERROR: Environment variable OUTPATH must be set\n"; + packager::exiter::exit_program("ERROR: Environment variable OUTPATH not set!", "check_environment"); + } + + if ( ! $ENV{'PRJ'} ) + { + packager::exiter::exit_program("ERROR: Environment variable PRJ not set!", "check_environment"); + } +} + +############################################################# +# Check 3: Checking the parameter. Only "-i" is valid +############################################################# + +sub check_parameter +{ + while ( $#ARGV >= 0 ) + { + my $param = shift(@ARGV); + + if ($param eq "-i") { $packager::globals::ignoreerrors = 1; } + else + { + print("\n*************************************\n"); + print("Sorry, unknown parameter: $param"); + print("\n*************************************\n"); + usage(); + exit(-1); + } } } diff --git a/solenv/bin/modules/packager/globals.pm b/solenv/bin/modules/packager/globals.pm index 359c7a6fa958..2f1080f54033 100644 --- a/solenv/bin/modules/packager/globals.pm +++ b/solenv/bin/modules/packager/globals.pm @@ -2,9 +2,9 @@ # # $RCSfile: globals.pm,v $ # -# $Revision: 1.2 $ +# $Revision: 1.3 $ # -# last change: $Author: kz $ $Date: 2004-06-11 18:21:30 $ +# last change: $Author: obo $ $Date: 2004-11-18 08:42:15 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -72,10 +72,27 @@ BEGIN $packlistname = "pack.lst"; $compiler = ""; + $ignoreerrors = 0; $logging = 0; $logfilename = "packager_logfile.log"; # the default logfile name for global errors @logfileinfo = (); + + $plat = $^O; + + if (( $plat =~ /MSWin/i ) || (( $plat =~ /cygwin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" ))) + { + $separator = "\\"; + $iswin = 1; + $isunix = 0; + } + else + { + $separator = "/"; + $iswin = 0; + $isunix = 1; + } + } 1; |