summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-04-02 16:46:36 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-04-02 16:46:36 +0200
commita29f798a2506ec2b57cd4f7ebbdaf58387e6e490 (patch)
tree7dd089a330e4ad493ecd938428e8b418789b8f49 /checksetup.pl
parent1fa1aa54ae725989c6c44f198376e37ba000ca02 (diff)
downloadbugzilla-a29f798a2506ec2b57cd4f7ebbdaf58387e6e490.tar.gz
bugzilla-a29f798a2506ec2b57cd4f7ebbdaf58387e6e490.tar.xz
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
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl18
1 files changed, 15 insertions, 3 deletions
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</"RUNNING CHECKSETUP NON-INTERACTIVELY"> 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 <cpanm>
+and other utilities used to install Perl dependencies.
+
=item B<--check-modules>
Only check for correct module dependencies and quit afterward.