summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-10-15 15:14:27 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-10-15 15:35:09 +0300
commit05231f486b93dfb3992bfb96568f8c71d877e104 (patch)
treee5ac9e100e26d178abc454c614bd356a02655f5e /bin
parent13bc1e0b99dd1d32bc0fef1dbdf0813ff5f4c66c (diff)
downloadqt4-tools-05231f486b93dfb3992bfb96568f8c71d877e104.tar.gz
Fix epocroot handling in createpackage.pl script
Before this fix, creating stub sis failed if epocroot was simply a forward slash. Mixing forward slashes and backslashes also caused issues. Reviewed-by: Janne Koskinen
Diffstat (limited to 'bin')
-rwxr-xr-xbin/createpackage.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 41ba2e37f0..522d1fbc82 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -140,7 +140,12 @@ unless (GetOptions('i|install' => \$install,
}
my $epocroot = $ENV{EPOCROOT};
-$epocroot =~ s,[\\/]$,,x;
+if ($epocroot ne "") {
+ $epocroot =~ s,\\,/,g;
+ if ($epocroot =~ m,[^/]$,) {
+ $epocroot = $epocroot."/";
+ }
+}
my $certfilepath = abs_path(dirname($certfile));
@@ -328,11 +333,11 @@ if ($preprocessonly) {
if($stub) {
if(!($epocroot)) { die("ERROR: EPOCROOT must be set to create stub sis files"); }
- my $systeminstall = "$epocroot/epoc32/data/z/system/install";
+ my $systeminstall = "${epocroot}epoc32/data/z/system/install";
mkpath($systeminstall);
my $stub_sis_name = $systeminstall."/".$stub_sis_name;
# Create stub SIS.
- system ("$epocroot/epoc32/tools/makesis -s $pkgoutput $stub_sis_name");
+ system ("${epocroot}epoc32/tools/makesis -s $pkgoutput $stub_sis_name");
} else {
if ($certtext eq "Self Signed"
&& !@certificates
@@ -346,7 +351,7 @@ if($stub) {
# Create SIS.
# The 'and' is because system uses 0 to indicate success.
if($epocroot) {
- system ("$epocroot/epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
+ system ("${epocroot}epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
} else {
system ("makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
}