diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-06-16 00:15:00 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-06-16 00:15:00 +0200 |
commit | f74ffb50e9a2709539275a8b1fae43004e32e473 (patch) | |
tree | a8599310b50d4d9032d75d4fdb46ce2b670bd3e4 | |
parent | b5cda89cb5cb17db41ce75b007c15d5fc90feb61 (diff) |
ekgping: Only call dist_file if no beep file was specified
-rwxr-xr-x | bin/ekgping | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ekgping b/bin/ekgping index 43981a0..e7c5764 100755 --- a/bin/ekgping +++ b/bin/ekgping @@ -23,7 +23,7 @@ my $dead_count = 0; my $column = 0; my $column_max = Term::Size::chars; -my $beep_file = dist_file( 'ekgping', 'beep.ogg' ); +my $beep_file; my $quiet = 0; GetOptions( @@ -34,6 +34,8 @@ GetOptions( ) or usage(); +$beep_file //= dist_file( 'ekgping', 'beep.ogg' ); + my $host = shift or usage(); my @ping_opts = @ARGV; my $mixer = SDL::Mixer->new(); |