summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer/scpzipfiles.pm
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-02-24 15:20:59 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-02-24 15:20:59 +0000
commitd8b97c45bfd6b6b072c4c59c87138cdd9a35e78a (patch)
treef378fd2c699e03f68f78827d9c58e82f510b97a9 /solenv/bin/modules/installer/scpzipfiles.pm
parent0c89cde6587fd8cced9a121624997a9549e9d99b (diff)
INTEGRATION: CWS nativefixer4 (1.7.8); FILE MERGED
2005/02/14 16:21:42 is 1.7.8.1: #i41085# all variables for scpzip_replace
Diffstat (limited to 'solenv/bin/modules/installer/scpzipfiles.pm')
-rw-r--r--solenv/bin/modules/installer/scpzipfiles.pm28
1 files changed, 10 insertions, 18 deletions
diff --git a/solenv/bin/modules/installer/scpzipfiles.pm b/solenv/bin/modules/installer/scpzipfiles.pm
index 29ed0fe86db4..5c7a8361e7da 100644
--- a/solenv/bin/modules/installer/scpzipfiles.pm
+++ b/solenv/bin/modules/installer/scpzipfiles.pm
@@ -2,9 +2,9 @@
#
# $RCSfile: scpzipfiles.pm,v $
#
-# $Revision: 1.7 $
+# $Revision: 1.8 $
#
-# last change: $Author: rt $ $Date: 2005-01-31 10:46:48 $
+# last change: $Author: vg $ $Date: 2005-02-24 16:20:59 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -74,7 +74,7 @@ use installer::systemactions;
sub replace_all_ziplistvariables_in_file
{
- my ( $fileref, $variablesref ) = @_;
+ my ( $fileref, $variableshashref ) = @_;
for ( my $i = 0; $i <= $#{$fileref}; $i++ )
{
@@ -82,21 +82,13 @@ sub replace_all_ziplistvariables_in_file
if ( $line =~ /^.*\$\{\w+\}.*$/ ) # only occurence of ${abc}
{
- for ( my $j = 0; $j <= $#{$variablesref}; $j++ )
- {
- my $variableline = ${$variablesref}[$j];
-
- my ($key, $value);
-
- if ( $variableline =~ /^\s*(\w+?)\s+(.*?)\s*$/ )
- {
- $key = $1;
- $value = $2;
- $key = '${' . $key . '}';
- }
+ my $key;
+ foreach $key (keys %{$variableshashref})
+ {
+ my $value = $variableshashref->{$key};
+ $key = '${' . $key . '}';
$line =~ s/\Q$key\E/$value/g;
-
${$fileref}[$i] = $line;
}
}
@@ -150,7 +142,7 @@ sub replace_all_ziplistvariables_in_rtffile
sub resolving_scpzip_replace_flag
{
- my ($filesarrayref, $variablesref, $item, $languagestringref) = @_;
+ my ($filesarrayref, $variableshashref, $item, $languagestringref) = @_;
my $diritem = lc($item);
@@ -212,7 +204,7 @@ sub resolving_scpzip_replace_flag
# ToDo: How about binary patching?
my $onefileref = installer::files::read_file($movepath);
- replace_all_ziplistvariables_in_file($onefileref, $variablesref);
+ replace_all_ziplistvariables_in_file($onefileref, $variableshashref);
installer::files::save_file($destinationpath ,$onefileref);
}