From cd9de45cd3eb2ece8c15617594617e7b18b38ed1 Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Mon, 22 Jun 2020 17:25:57 -0500 Subject: [PATCH] Add basic help section, tag v1.2 in advance --- bin/generate-zbm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bin/generate-zbm b/bin/generate-zbm index fd8eec3b7..39d6122b9 100755 --- a/bin/generate-zbm +++ b/bin/generate-zbm @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = '1.1'; +our $VERSION = '1.2'; use Getopt::Long qw(:config no_ignore_case auto_version); use Pod::Usage qw(pod2usage); @@ -44,13 +44,23 @@ $runConf{exit_code} = 0; GetOptions( "version|v=s" => \$runConf{version}, - "pkgname|p=s" => \$runConf{pkgname}, - "action|a=s" => \$runConf{action}, - "update|u=s" => \$runConf{update}, "kernel|k=s" => \$runConf{kernel}, "bootdir|b=s" => \$runConf{bootdir}, "confd|C=s" => \$runConf{confd}, "config|c=s" => \$configfile, + "help|h" => sub { + my $bin = basename($0); + my $help = << "EOF"; +Usage: $bin [options] + -v|--version Manually set the version + -k|--kernel Manually set the kernel version + -b|--bootdir Manually set the location for the generated boot files + -C|--confd Manually set the Dracut configuration directory + -c|--config Manually set the configuration file +EOF + print $help; + exit; + }, ); # Sanity check, ensure we have a configuration file