#! /usr/bin/env perl
#
# Install script for DateManipPlugin
#
# Copyright (C) 2004-2015 Foswiki Contributors. All Rights Reserved.
# Foswiki Contributors are listed in the AUTHORS file in the root of
# this distribution. NOTE: Please extend that file, not this notice.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.
#
# Author: Crawford Currie http://c-dot.co.uk
#
# NOTE TO THE DEVELOPER: THIS FILE IS GENERATED AUTOMATICALLY
# BY THE BUILD PROCESS DO NOT EDIT IT - IT WILL BE OVERWRITTEN
#
use strict;
use warnings;
require 5.008;
use File::Spec;
use Cwd;
=pod
---+ DateManipPlugin_installer
This is the installer script. The basic function of this script is to
locate an archive and unpack it.
It will also check the dependencies listed in DEPENDENCIES and assist
the user in installing any that are missing. The script also automatically
maintains the revision histories of any files that are being installed by the
package but already have ,v files on disc (indicating that they are
revision controlled).
The script also functions as an *uninstaller* by passing the parameter
=uninstall= on the command-line. Note that uninstallation does *not* revert
the history of any topic changed during the installation.
The script allows the definition of PREINSTALL and POSTINSTALL scripts.
These scripts can be used for example to modify the configuration during
installation, using the functions described below.
Refer to the documentation of =configure=
=cut
# This is all done in package Foswiki so that reading LocalSite.cfg and Foswiki.cfg
# will put the config vars into the right namespace.
package Foswiki;
# The root of package URLs
my $PACKAGES_URL = 'https://foswiki.org/pub/Extensions';
# Extract MANIFEST and DEPENDENCIES from the __DATA__
undef $/;
my @DATA = split( /<<<< (.*?) >>>>\s*\n/, );
shift @DATA; # remove empty first element
# Establish where we are
my @path = ( 'tools', 'extender.pl' );
my $wd = Cwd::cwd();
$wd =~ /^(.*)$/; # untaint
unshift( @path, $1 ) if $1;
my $script = File::Spec->catfile(@path);
unless ( my $return = do $script ) {
my $message = <;
close(F);
$data =~ /^(.*)$/s; # untaint
eval $1;
if ($@) {
$message .= "Error when trying to eval the file content: $@\n";
}
else {
print STDERR
"'do $script failed, but install was able to proceed: $message";
undef $message;
}
}
else {
$message .= "Could not open file using open() either: $!\n";
}
die $message if $message;
}
sub preuninstall {
# # No PREUNINSTALL script;
}
sub postuninstall {
# # No POSTUNINSTALL script;
}
sub preinstall {
# # No PREINSTALL script;
}
sub postinstall {
# # No POSTINSTALL script;
}
Foswiki::Extender::install( $PACKAGES_URL, 'DateManipPlugin', 'DateManipPlugin',
@DATA );
1;
# MANIFEST and DEPENDENCIES are done this way
# to make it easy to extract them from this script.
__DATA__
<<<< MANIFEST >>>>
data/System/DateManipPlugin.txt,0644,1b4f682addddb2eb9f246cedda04435e, (noci)
lib/Foswiki/Plugins/DateManipPlugin/Config.spec,0644,a8768b54893865995dc3242b27227225, (noci)
lib/Foswiki/Plugins/DateManipPlugin/Core.pm,0644,5d5e1929bcac4fc7281a8a6633943729, (noci)
lib/Foswiki/Plugins/DateManipPlugin/DEPENDENCIES,0644,9c5b8b3164fc3badb1c41ad456d0349c, (noci)
lib/Foswiki/Plugins/DateManipPlugin.pm,0644,55e89e7ea56dc66f3419c935fe12a7e1, (noci)
locale/DateManipPlugin/bg.po,0644,4c562b1eb8f61cc57547534ab54c04f1, (noci)
locale/DateManipPlugin/cs.po,0644,eb154ba4d42caf1b2d68acfc60df0413, (noci)
locale/DateManipPlugin/da.po,0644,2edf4fa976759e6c3f4ce9acb3aceb3a, (noci)
locale/DateManipPlugin/de.po,0644,76f20fb584e3e13b0ca4e95894e3e0dc, (noci)
locale/DateManipPlugin/el.po,0644,6bcba0e704d5c2f5a5cb77ebf56d8594, (noci)
locale/DateManipPlugin/es.po,0644,74befcec930eb271f1f2273a7ecc2d37, (noci)
locale/DateManipPlugin/fi.po,0644,a415a9f3a0bc54a6714823b11455e191, (noci)
locale/DateManipPlugin/Foswiki.pot,0644,6a2d3bfc644e4809acafb9b0a02396ee, (noci)
locale/DateManipPlugin/fr.po,0644,7e146b609824abf8cb4cf99888e5b78e, (noci)
locale/DateManipPlugin/it.po,0644,e70fa978661db78058ac1aa768ee110a, (noci)
locale/DateManipPlugin/ja.po,0644,c6d6abc0dcf0bae537d3fdecc68c58a6, (noci)
locale/DateManipPlugin/ko.po,0644,755faa9eaaae10097be6ff4d1e7a882b, (noci)
locale/DateManipPlugin/nl.po,0644,3bb682110e0158a5ee549a10a933d4e7, (noci)
locale/DateManipPlugin/no.po,0644,48fc365bc5ced18d14e579a3b006cb01, (noci)
locale/DateManipPlugin/pl.po,0644,f8c2b0082f2c634ad5c6a9b7c54ad273, (noci)
locale/DateManipPlugin/pt-br.po,0644,3526714304b2646dc8479fa9377052cc, (noci)
locale/DateManipPlugin/pt.po,0644,31872bb07052b91b647c18c853e58e6c, (noci)
locale/DateManipPlugin/ru.po,0644,382aecee38eb91f4516def8450611dcd, (noci)
locale/DateManipPlugin/sv.po,0644,c82ce867e1c7c671008a02edfbc6d5b5, (noci)
locale/DateManipPlugin/tlh.po,0644,82070f105c12bb13f145d93e3e8a8643, (noci)
locale/DateManipPlugin/tr.po,0644,e42eaf2ea844808752d0d20f8de30404, (noci)
locale/DateManipPlugin/uk.po,0644,4e0a32cd87653c008243c6d3ec809cc5, (noci)
locale/DateManipPlugin/zh-cn.po,0644,f375b090228c3047d823fcce46ab3101, (noci)
locale/DateManipPlugin/zh-tw.po,0644,071a547ed7e20fe2c48b47a7a8e7a8fa, (noci)
<<<< DEPENDENCIES >>>>
Date::Manip,>=6.0,1,cpan,Required.