summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-01-08 13:59:52 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2010-01-11 11:07:13 +0100
commitb3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3 (patch)
tree012f1b330d710d2d6c59bebc576a1592eeb84336 /bin
parent145fecc833926c307819752912e6833169799a53 (diff)
[syncqt] Make it possible to override the base directory
This removes the need to set the QTDIR environment variable and makes it possible to call syncqt conveniently when creating webkit packages. Reviewed-by: Thiago
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 6c1a43892e..be0a019905 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -15,6 +15,13 @@ use Cwd;
use Config;
use strict;
+for (my $i = 0; $i < $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) {
+ $ENV{"QTDIR"} = $ARGV[$i + 1];
+ last;
+ }
+}
+
die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
# global variables
@@ -579,6 +586,10 @@ while ( @ARGV ) {
} elsif("$arg" eq "-show") {
$var = "showonly";
$val = "yes";
+ } elsif("$arg" eq "-base-dir") {
+ # skip, it's been dealt with at the top of the file
+ shift @ARGV;
+ next;
} elsif("$arg" eq '*') {
# workaround for windows 9x where "%*" expands to "*"
$var = 1;