diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-06-18 12:10:31 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-06-18 12:10:31 (GMT) |
commit | b11cac64e7a0d0ecf0295a66bf54753fc7353376 (patch) | |
tree | 1f9f0882fc76ac4cd2a4a7371a7e63e30fe1265f /bin | |
parent | 9ad849c8520e3a1efe47f1f67fb675c8e7754054 (diff) | |
download | Qt-b11cac64e7a0d0ecf0295a66bf54753fc7353376.zip Qt-b11cac64e7a0d0ecf0295a66bf54753fc7353376.tar.gz Qt-b11cac64e7a0d0ecf0295a66bf54753fc7353376.tar.bz2 |
Patching capabilities now patches also the pkg file UID.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/patch_capabilities.pl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index f18aaba..4c4e67a 100644 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -31,13 +31,22 @@ if (@ARGV) # Start with no binaries listed. my @binaries = (); - # Open the ".pkg" file. + my $tempPkgFileName = $pkgFileName."_@@TEMP@@"; + unlink($tempPkgFileName); + open (NEW_PKG, ">>".$tempPkgFileName); open (PKG, "<".$pkgFileName); # Parse each line. while (<PKG>) { my $line = $_; + my $newLine = $line; + if ( $line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/) + { + $newLine =~ s/\(0x./\(0xE/; + } + print NEW_PKG $newLine; + chomp ($line); # If the line specifies a file, parse the source and destination locations. @@ -54,8 +63,11 @@ if (@ARGV) } } - # Close the ".pkg" file. close (PKG); + close (NEW_PKG); + + unlink($pkgFileName); + rename($tempPkgFileName, $pkgFileName); print ("\n"); |