diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-09-07 11:48:27 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-09-07 11:48:27 +0200 |
commit | b0e73f442c05ef721cd8bb3c75aa56353989e205 (patch) | |
tree | 9e423ece76a20dcb5d49bed415dd8e5ef764b963 /bin/ura-m | |
parent | 11f8c8b8cf75a2624af7c28f829d1068bcb8f3f7 (diff) |
Fix script name in version/help output
Diffstat (limited to 'bin/ura-m')
-rwxr-xr-x | bin/ura-m | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |