summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-01 09:52:37 (GMT)
committeraxis <qt-info@nokia.com>2010-03-01 09:52:37 (GMT)
commit555ca584a791b9d3eacaf3d1a97bb1bc8517696f (patch)
treea96e4c28b5a2bf1d7520b79bc18fbf7271365310 /bin
parentfd7d6597326796c5ac694262dfc8c1c33a54ee89 (diff)
downloadQt-555ca584a791b9d3eacaf3d1a97bb1bc8517696f.zip
Qt-555ca584a791b9d3eacaf3d1a97bb1bc8517696f.tar.gz
Qt-555ca584a791b9d3eacaf3d1a97bb1bc8517696f.tar.bz2
Made redirection to /dev/null cross platform.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/patch_capabilities.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index d3013f6..4390957 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -65,6 +65,9 @@ sub trim($) {
return $string;
}
+my $nullDevice = "/dev/null";
+$nullDevice = "NUL" if ($^O =~ /MSWin/);
+
my @capabilitiesToAllow = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData");
my @capabilitiesSpecified = ();
@@ -246,7 +249,7 @@ if (@ARGV)
# Actually execute the elftran command to set the capabilities.
print ("Executing ".$commandToExecute."\n");
- system ($commandToExecute." > NUL");
+ system ($commandToExecute." > $nullDevice");
## Create another command line to check that the set capabilities are correct.
#$commandToExecute = "elftran -dump s ".$binaryPath;