From 98fca3e86b9b03212f3658fcfad400686c73a369 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 1 Dec 2014 13:58:03 +0100 Subject: [PATCH] be silent unless told otherwise --- xfce-xterm-launcher-update | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xfce-xterm-launcher-update b/xfce-xterm-launcher-update index fe24533..d1b4c61 100755 --- a/xfce-xterm-launcher-update +++ b/xfce-xterm-launcher-update @@ -6,6 +6,7 @@ use File::Slurp; use Data::Dumper; my $launcher = $ARGV[0]; +my $verbose = 0; my $launcher_dir = "$ENV{HOME}/.config/xfce4/panel/launcher-$launcher"; @@ -30,7 +31,7 @@ for my $xterm_script (@xterm_scripts) { if ($desktop_files{$name}{content_fields}{Icon} ne $icon_file) { $desktop_files{$name}{content_fields}{Icon} = $icon_file; replace($desktop_files{$name}); - say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name" if $verbose; } } else { @@ -47,7 +48,7 @@ for my $xterm_script (@xterm_scripts) { current => 1 }; replace($desktop_files{$name}); - say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name" if $verbose; } } @@ -55,7 +56,7 @@ $desktop_files{XTerm}{current} = 1; # we always want that for my $name (sort keys %desktop_files) { unless ($desktop_files{$name}{current}) { - say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name" if $verbose; unlink($desktop_files{$name}{filename}); } }