summaryrefslogtreecommitdiff
path: root/bin/ura-m
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-09-07 11:48:27 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-09-07 11:48:27 +0200
commitb0e73f442c05ef721cd8bb3c75aa56353989e205 (patch)
tree9e423ece76a20dcb5d49bed415dd8e5ef764b963 /bin/ura-m
parent11f8c8b8cf75a2624af7c28f829d1068bcb8f3f7 (diff)
Fix script name in version/help output
Diffstat (limited to 'bin/ura-m')
-rwxr-xr-xbin/ura-m5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ura-m b/bin/ura-m
index 76b05c8..e11b320 100755
--- a/bin/ura-m
+++ b/bin/ura-m
@@ -26,6 +26,7 @@ my $via;
my ( $list_services, $service );
my $ura_base = 'http://ivu.aseag.de/interfaces/ura';
my $ura_version = 1;
+my $script_name = (split(qr{/}, $0))[-1];
GetOptions(
'f|strftime=s' => \$strftime_format,
@@ -93,7 +94,7 @@ my $status = Travel::Status::DE::URA->new(
sub show_help {
my ($code) = @_;
- print "Usage: $0 [-pV] [-o <output>] [-l <lines>] [-v <stopname>] "
+ print "Usage: $script_name [-pV] [-o <output>] [-l <lines>] [-v <stopname>] "
. "<stopname>\n"
. "See also: man ura-m\n";
@@ -112,7 +113,7 @@ sub show_services {
}
sub show_version {
- say "$0 version ${VERSION}";
+ say "$script_name version ${VERSION}";
exit 0;
}