From 7f934e0e6943b3730e251960a23462d376a16003 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 7 Jan 2015 09:11:07 -0500 Subject: [PATCH] Add version to the usage line in zmvideo.pl --- scripts/zmvideo.pl.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/zmvideo.pl.in b/scripts/zmvideo.pl.in index 46cf83998..2b6765420 100644 --- a/scripts/zmvideo.pl.in +++ b/scripts/zmvideo.pl.in @@ -55,6 +55,7 @@ my $scale = ''; my $fps = ''; my $size = ''; my $overwrite = 0; +my $version = 0; my @formats = split( /\s+/, $Config{ZM_FFMPEG_FORMATS} ); for ( my $i = 0; $i < @formats; $i++ ) @@ -77,15 +78,21 @@ Parameters are :- -F, --fps= - Absolute frame rate, in frames per second -S, --size= - Absolute video size, WxH or other specification supported by ffmpeg -o, --overwrite - Whether to overwrite an existing file, off by default. +-v, --version - Outputs the currently installed version of ZoneMinder "); exit( -1 ); } -if ( !GetOptions( 'event=i'=>\$event_id, 'format|f=s'=>\$format, 'rate|r=f'=>\$rate, 'scale|s=f'=>\$scale, 'fps|F=f'=>\$fps, 'size|S=s'=>\$size, 'overwrite'=>\$overwrite ) ) +if ( !GetOptions( 'event=i'=>\$event_id, 'format|f=s'=>\$format, 'rate|r=f'=>\$rate, 'scale|s=f'=>\$scale, 'fps|F=f'=>\$fps, 'size|S=s'=>\$size, 'overwrite'=>\$overwrite, version=>\$version ) ) { Usage(); } +if ( $version ) { + print ZoneMinder::Base::ZM_VERSION . "\n"; + exit(0); +} + if ( !$event_id || $event_id < 0 ) { print( STDERR "Please give a valid event id\n" );