summaryrefslogtreecommitdiff
path: root/bin/ekgping
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-16 00:15:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-16 00:15:00 +0200
commitf74ffb50e9a2709539275a8b1fae43004e32e473 (patch)
treea8599310b50d4d9032d75d4fdb46ce2b670bd3e4 /bin/ekgping
parentb5cda89cb5cb17db41ce75b007c15d5fc90feb61 (diff)
ekgping: Only call dist_file if no beep file was specified
Diffstat (limited to 'bin/ekgping')
-rwxr-xr-xbin/ekgping4
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();