diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-13 05:35:51 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-13 05:35:51 (GMT) |
commit | 6b641dde82a42fb6a0ed63335022ab390aa72014 (patch) | |
tree | 3f50035de539c9af5f21b2d0b9fad818230de4e5 /bin/syncqt | |
parent | 9cf33a0a71060f4f30aec772aefc845b91ba87d9 (diff) | |
download | Qt-6b641dde82a42fb6a0ed63335022ab390aa72014.zip Qt-6b641dde82a42fb6a0ed63335022ab390aa72014.tar.gz Qt-6b641dde82a42fb6a0ed63335022ab390aa72014.tar.bz2 |
Quietness option.
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-x | bin/syncqt | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -56,6 +56,7 @@ my %moduleheaders = ( # restrict the module headers to those found in relative p # global variables (modified by options) my $module = 0; my $showonly = 0; +my $quiet = 0; my $remove_stale = 1; my $force_win = 0; my $force_relative = 0; @@ -84,6 +85,7 @@ sub showUsage print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n"; print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n"; + print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n"; print " -help This help\n"; exit 0; } @@ -488,7 +490,7 @@ sub symlinkFile my ($file,$ifile) = @_; if ($isunix) { - print "symlink created for $file "; + print "symlink created for $file " unless $quiet; if ( $force_relative && ($ifile =~ /^$basedir/)) { my $t = getcwd(); my $c = -1; @@ -496,9 +498,9 @@ sub symlinkFile $t =~ s-^$basedir/--; $p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 ); $file =~ s-^$basedir/-$p-; - print " ($file)\n"; + print " ($file)\n" unless $quiet; } - print "\n"; + print "\n" unless $quiet; return symlink($file, $ifile); } return copyFile($file, $ifile); @@ -625,7 +627,7 @@ while ( @ARGV ) { $force_relative--; } } elsif ("$var" eq "module") { - print "module :$val:\n"; + print "module :$val:\n" unless $quiet; die "No such module: $val" unless(defined $modules{$val}); push @modules_to_sync, $val; } elsif ("$var" eq "output") { @@ -835,7 +837,7 @@ foreach (@modules_to_sync) { } } } - print "header created for $iheader ($header_copies)\n" if($header_copies > 0); + print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet); } } } @@ -867,7 +869,7 @@ foreach (@modules_to_sync) { if($master_include && $master_contents) { my $master_dir = dirname($master_include); mkpath $master_dir, 0777; - print "header (master) created for $lib\n"; + print "header (master) created for $lib\n" unless $quiet; open MASTERINCLUDE, ">$master_include"; print MASTERINCLUDE "$master_contents"; close MASTERINCLUDE; @@ -891,7 +893,7 @@ foreach (@modules_to_sync) { if($headers_pri_file && $master_contents) { my $headers_pri_dir = dirname($headers_pri_file); mkpath $headers_pri_dir, 0777; - print "headers.pri file created for $lib\n"; + print "headers.pri file created for $lib\n" unless $quiet; open HEADERS_PRI_FILE, ">$headers_pri_file"; print HEADERS_PRI_FILE "$headers_pri_contents"; close HEADERS_PRI_FILE; |