#!/usr/bin/perl

###############################################################################
# Required inclusions.
###############################################################################
use strict;
use warnings;
use Alien::Lightbox;
use Getopt::Long;
use Pod::Usage;

###############################################################################
# Read in our command line arguments.
###############################################################################
my $quiet;
my ($help, $man);
GetOptions(
    'quiet'     => \$quiet,
    'help|?'    => \$help,
    'man'       => \$man,
    ) || pod2usage(1);
pod2usage(1) if ($help);
pod2usage( -exitstatus=>0, -verbose=>2 ) if ($man);

my $dir = shift || './lightbox';

###############################################################################
# Install Lightbox.
###############################################################################
print "Installing Lightbox to $dir\n" unless ($quiet);
Alien::Lightbox->install( $dir );
print "... done\n" unless ($quiet);

=head1 NAME

lightbox-install - Lightbox installation

=head1 SYNOPSIS

  lightbox-install [options] destdir

  Options:
    --quiet     Install quietly; only report errors
    --help/-?   Brief help message
    --man       Full documentation
    destdir     Directory to install to (default "./lightbox")

=head1 DESCRIPTION

Installs the Lightbox JS (including all CSS themes and images) into the
specified F<destdir>, using C<Alien::Lightbox>.

=head1 OPTIONS

=over

=item B<--quiet>

Install quietly; only error messages will be displayed.

=item B<--help/-?>

Displays a brief help message.

=item B<--man>

Displays the full documentation.

=item B<destdir>

Directory that the Lightbox JS library should be installed into.  Defaults to
F<./lightbox>.

=back

=head1 AUTHOR

Graham TerMarsch (cpan@howlingfrog.com)

=head1 LICENSE

Copyright (C) 2007, Graham TerMarsch.  All rights reserved.

This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=head1 SEE ALSO

L<Alien::Lightbox>.

=cut
