Skip to content

Commit

Permalink
Issue RotherOSS#12: also allow the options -help and --help
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed May 8, 2020
1 parent 86002d8 commit f01c30e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bin/otobo.CheckModules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,29 @@
my $PrintAllModules;
my $PrintPackageList;
my $PrintCpanfile;
my $Help;
my $PrintHelp;
GetOptions(
all => \$PrintAllModules,
list => \$PrintPackageList,
cpanfile => \$PrintCpanfile,
h => \$Help
'help|h' => \$PrintHelp,
);

# check needed params
if ($Help) {
if ($PrintHelp) {
print "\n";
print "Print all required and optional packages of OTOBO.\n";
print "Optionally limit to the required but missing packages or modules.\n";
print "\n";
print "Usage:\n";
print " otobo.CheckModules.pl [-list|-cpanfile|-all]\n";
print " otobo.CheckModules.pl [-help|-list|-cpanfile|-all]\n";
print "\n";
print "Options:\n";
printf " %-22s - %s\n", '[-list]', 'Return an install command with all required packages that are missing.';
printf " %-22s - %s\n", '[-cpanfile]', 'Return a cpanfile with the required modules that are missing.';
printf " %-22s - %s\n", '[-all]', 'Return all required, optional and bundled packages of OTOBO.';
printf " %-22s - %s\n", '[-help]', 'Print this help message.';
printf " %-22s - %s\n", '[-h]', 'Same as -help.';
printf " %-22s - %s\n", '[-list]', 'Print an install command with all required packages that are missing.';
printf " %-22s - %s\n", '[-cpanfile]', 'Print a cpanfile with the required modules that are missing.';
printf " %-22s - %s\n", '[-all]', 'Print all required, optional and bundled packages of OTOBO.';
print "\n";

exit 1;
Expand Down

0 comments on commit f01c30e

Please sign in to comment.