1#! /usr/bin/env perl 2# Shell access to the PERLDEPENDENCYREPORT macro. 3# See bottom of file for POD documentation. 4# 5# Author: Crawford Currie http://c-dot.co.uk and Foswiki Contributors. 6# 7# Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 8# 9# Copyright (C) 2013-2014 Foswiki Contributors. Foswiki Contributors 10# are listed in the AUTHORS file in the root of this distribution. 11# NOTE: Please extend that file, not this notice. 12# 13# This program is free software; you can redistribute it and/or 14# modify it under the terms of the GNU General Public License 15# as published by the Free Software Foundation; either version 2 16# of the License, or (at your option) any later version. For 17# more details read LICENSE in the root of this distribution. 18# 19# This program is distributed in the hope that it will be useful, 20# but WITHOUT ANY WARRANTY; without even the implied warranty of 21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22# 23# As per the GPL, removal of this notice is prohibited. 24 25use warnings; 26use strict; 27 28use Getopt::Long; 29use Pod::Usage (); 30 31# Assume we are in the tools dir, and we can find bin and lib from there 32use FindBin (); 33$FindBin::Bin =~ /^(.*)$/; 34my $bin = $1; 35 36use lib "$FindBin::Bin/../bin"; 37require 'setlib.cfg'; 38 39require Foswiki::Macros::PERLDEPENDENCYREPORT; 40 41# Command-line parameter handling 42 43my $all = ''; 44 45my $result = Getopt::Long::GetOptions( 46 'help' => sub { 47 Pod::Usage::pod2usage( -exitstatus => 0, -verbose => 2 ); 48 }, 49 "all" => \$all, 50) or Pod::Usage::pod2usage( -exitstatus => 0, -verbose => 2 ); 51 52$all = ($all) ? 'all' : 'missing'; 53 54print Foswiki::cliDependencyReport($all); 55 561; 57__END__ 58 59=head1 tools/dependencies 60 61Shell interface to the PERLDEPENDENCYREPORT macro. Generates a report 62of missing dependencies. 63 64=head1 SYNOPSIS 65 66 tools/dependencies [options] 67 68Use all to see all dependencies, and not just missing dependencies. 69 70=head1 OPTIONS 71 72=over 8 73 74=item B<all> 75 76If set then all dependencies will be reported, not just missing dependencies. 77 78=item B<usage> 79 80Information on using this script. 81 82