summaryrefslogtreecommitdiffstats
path: root/bin/createpackage.pl
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2009-09-06 21:09:25 (GMT)
committeraxis <qt-info@nokia.com>2009-10-23 08:14:23 (GMT)
commitc05220038d50f26cb5da03b13b82372297f99c83 (patch)
tree2fc9d5e93bf826cebf464317c60d7e5053771dfb /bin/createpackage.pl
parentf6b942b88ed2519b73c540120fde73390716173f (diff)
downloadQt-c05220038d50f26cb5da03b13b82372297f99c83.zip
Qt-c05220038d50f26cb5da03b13b82372297f99c83.tar.gz
Qt-c05220038d50f26cb5da03b13b82372297f99c83.tar.bz2
Fix portability problems in bin/createpackage.pl.
* Use File::Spec functions to manipulate path components. * Keep $targetplatform lower case for case sensitive systems. Signed-off-by: axis <qt-info@nokia.com>
Diffstat (limited to 'bin/createpackage.pl')
-rwxr-xr-xbin/createpackage.pl14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 4597b04..3480702 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -145,10 +145,8 @@ my $signed_sis_name = $pkgoutputbasename.".sis";
# Store some utility variables
my $scriptpath = dirname(__FILE__);
my $certtext = $certificate;
-my $certpath = $scriptpath;
-$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash
-$certpath = $certpath."../"; # certificates are one step up in hierarcy
-$certpath =~ s-/-\\-go; # for those working with UNIX shells
+# certificates are one step up in hierarchy
+my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir());
# Check some pre-conditions and print error messages if needed
unless (length($templatepkg) && length($platform) && length($target)) {
@@ -172,14 +170,14 @@ if (length($certificate)) {
} else {
#If no certificate is given, check default options
$certtext = "RnD";
- $certificate = $certpath."rd.cer";
- $key = $certpath."rd-key.pem";
+ $certificate = File::Spec->catfile($certpath, "rd.cer");
+ $key = File::Spec->catfile($certpath, "rd-key.pem");
stat($certificate);
unless( -e _ ) {
$certtext = "Self Signed";
- $certificate = $certpath."selfsigned.cer";
- $key = $certpath."selfsigned.key";
+ $certificate = File::Spec->catfile($certpath, "selfsigned.cer");
+ $key = File::Spec->catfile($certpath, "selfsigned.key");
}
}