diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-01-08 12:59:52 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-01-11 10:07:13 (GMT) |
commit | b3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3 (patch) | |
tree | 012f1b330d710d2d6c59bebc576a1592eeb84336 /bin | |
parent | 145fecc833926c307819752912e6833169799a53 (diff) | |
download | Qt-b3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3.zip Qt-b3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3.tar.gz Qt-b3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3.tar.bz2 |
[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-x | bin/syncqt | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |