move the module validation below the loading of sync.profile
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Tue, 18 Sep 2012 15:19:31 +0000 (17:19 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 19 Sep 2012 17:54:44 +0000 (19:54 +0200)
otherwise the -module option will always die.

Change-Id: I023ea5681a03a2848e1084eedbbcc66f8d060b69
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
bin/syncqt

index 05ee7a8..9e68a30 100755 (executable)
@@ -739,8 +739,6 @@ while ( @ARGV ) {
             $minimal--;
         }
     } elsif ($var eq "module") {
-        print "module :$val:\n" if($verbose_level);
-        die "No such module: $val" unless(defined $modules{$val});
         push @modules_to_sync, $val;
     } elsif ($var eq "separate-module") {
         my ($module, $prodir, $headerdir) = split(/:/, $val);
@@ -802,6 +800,8 @@ if (length($qt_version)) {
     $qt_version =~ s,.*^#\h*define\h+QT_VERSION_STR\h+"([^"]+)".*,$1,sm;
 }
 foreach my $lib (@modules_to_sync) {
+    die "No such module: $lib" unless(defined $modules{$lib});
+
     #iteration info
     my $dir = $modules{$lib};