From a29f798a2506ec2b57cd4f7ebbdaf58387e6e490 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 2 Apr 2015 15:46:36 +0100 Subject: Bug 1143005: Add parameter to checksetup.pl that generates a cpanfile usable by utilities such as cpanm for installing Perl dependencies r=dylan,a=glob --- checksetup.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 908029313..b1a3628bf 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -41,13 +41,19 @@ Bugzilla::Install::Util::no_checksetup_from_cgi() if $ENV{'SERVER_SOFTWARE'}; init_console(); my %switch; -GetOptions(\%switch, 'help|h|?', 'check-modules', 'no-templates|t', - 'verbose|v|no-silent', 'make-admin=s', - 'reset-password=s', 'version|V'); +GetOptions(\%switch, 'help|h|?', 'check-modules', 'cpanfile', + 'no-templates|t', 'verbose|v|no-silent', + 'make-admin=s', 'reset-password=s', 'version|V'); # Print the help message if that switch was selected. pod2usage({-verbose => 1, -exitval => 1}) if $switch{'help'}; +# Export cpanfile and exit +if ($switch{cpanfile}) { + export_cpanfile(); + exit; +} + # Read in the "answers" file if it exists, for running in # non-interactive mode. my $answers_file = $ARGV[0]; @@ -259,6 +265,12 @@ the L section. Display this help text +=item B<--cpanfile> + +Outputs a cpanfile in the document root listing the current and optional +modules with their respective versions. This file can be used by +and other utilities used to install Perl dependencies. + =item B<--check-modules> Only check for correct module dependencies and quit afterward. -- cgit v1.2.3-24-g4f1b