#! /usr/bin/env perl
#
# Install script for TreeBrowserPlugin
#
# 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
---+ TreeBrowserPlugin_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 = 'http://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, 'TreeBrowserPlugin', 'TreeBrowserPlugin',
@DATA );
1;
# MANIFEST and DEPENDENCIES are done this way
# to make it easy to extract them from this script.
__DATA__
<<<< MANIFEST >>>>
data/System/TreeBrowserPlugin.txt,0664,d4ed2330d2dec61f97eeaad335e303f8,
data/System/VarTREEBROWSER.txt,0664,e15a987e877ca6c4024dcd5ea7587d3b,
lib/Foswiki/Plugins/TreeBrowserPlugin.pm,0664,9d7edf055b6fe8f9d49e281098d1bd25,
pub/System/TreeBrowserPlugin/base.gif,0664,1f71b021e061a4948d69adc4ff10ccad,
pub/System/TreeBrowserPlugin/cd.gif,0664,f41037663522fab5c5c31530c7fa43d8,
pub/System/TreeBrowserPlugin/dmenu.css,0664,315ea0a45b144d357ffb295a964f4271,
pub/System/TreeBrowserPlugin/doc.gif,0664,7196724c138b6bd377d57599e0d94ca7,
pub/System/TreeBrowserPlugin/dtree.css,0664,6e2866f21791d36a64e1a733d2d54321,
pub/System/TreeBrowserPlugin/dtree.js,0664,c1cd2d40942c8b43c3c5320029b51d65,
pub/System/TreeBrowserPlugin/email.gif,0664,735e0f740f6ce0aa49c308b37e2243ed,
pub/System/TreeBrowserPlugin/empty.gif,0664,df22aff6e941ff1cc577333d1712b584,
pub/System/TreeBrowserPlugin/file.gif,0664,d9c3a2c048fe3407ac10fc4670d21e13,
pub/System/TreeBrowserPlugin/folder.gif,0664,ea16980ab437fa6ba4aba3d480e83e9e,
pub/System/TreeBrowserPlugin/folderopen.gif,0664,18aa3d75315bf95bf080357733437fcc,
pub/System/TreeBrowserPlugin/globe.gif,0664,d6b48614cf8dc9553e077c19197637d2,
pub/System/TreeBrowserPlugin/group.gif,0664,8312192ca8b5da5452f0e36a1a109677,
pub/System/TreeBrowserPlugin/home.gif,0664,8545f053d605f5707e99a56e93f9a9ea,
pub/System/TreeBrowserPlugin/image.gif,0664,c8a80bff348b21320e04f9c321a6816b,
pub/System/TreeBrowserPlugin/imgfolder.gif,0664,1d488d377762e65ab4e8b691ba01e5a4,
pub/System/TreeBrowserPlugin/join.gif,0664,4d5d614e0da056df815a4306d6368692,
pub/System/TreeBrowserPlugin/joinbottom.gif,0664,4b3daa7f2cc584f1aac0d142275d7cba,
pub/System/TreeBrowserPlugin/line.gif,0664,63ab38a6203262f15ca46c631232ea2c,
pub/System/TreeBrowserPlugin/minus.gif,0664,d647fbbd0ec410b8f3bb3357b62eedcf,
pub/System/TreeBrowserPlugin/minusbottom.gif,0664,b09d684cca7135ef728141aaf2464baa,
pub/System/TreeBrowserPlugin/musicfolder.gif,0664,21ece951734f23adb2f75befe1f31fc1,
pub/System/TreeBrowserPlugin/nolines_minus.gif,0664,eb2243a354ffcfac93ba0fe948f7167d,
pub/System/TreeBrowserPlugin/nolines_plus.gif,0664,ec92b634b63608fb4b0dbf114e3b89e1,
pub/System/TreeBrowserPlugin/page.gif,0664,c25b136c1cb3bb145495c25b35d93754,
pub/System/TreeBrowserPlugin/pdf.gif,0664,2b576e19eb58cac38f6b41d22f9a4339,
pub/System/TreeBrowserPlugin/person.gif,0664,9305b156ec0544d1ddb9e2cf4ed8619b,
pub/System/TreeBrowserPlugin/persons.gif,0664,c2aeb259ce6d6a134ef8ef720c222917,
pub/System/TreeBrowserPlugin/plus.gif,0664,5c55d798909c553deca31d610bd18fac,
pub/System/TreeBrowserPlugin/plusbottom.gif,0664,1924ce363c38a992f888a4df48c0b274,
pub/System/TreeBrowserPlugin/ppt.gif,0664,8488b5583f1ad7f694082c56c9e25742,
pub/System/TreeBrowserPlugin/question.gif,0664,ea0ca196ce0ebfd625cc1210abfdec6c,
pub/System/TreeBrowserPlugin/see.gif,0664,874afb0c728a3b3709499c065c1010c6,
pub/System/TreeBrowserPlugin/smenu.css,0664,1e6c86acce04774cf594663841f64d7f,
pub/System/TreeBrowserPlugin/sound.gif,0664,c70782215abfc4ce43ed548981820b30,
pub/System/TreeBrowserPlugin/trash.gif,0664,6cbfd3ed29531044aed9b4edb3cca9ad,
pub/System/TreeBrowserPlugin/tree.jpg,0664,eafdef6c8a282acc99d6829713aee6f0,
pub/System/TreeBrowserPlugin/trend.gif,0664,0faaeb1553474d4f8165271d656f3817,
pub/System/TreeBrowserPlugin/virtualhome.gif,0664,d0aeec4bbaee27101d9fb908f746cf8d,
pub/System/TreeBrowserPlugin/virtualperson.gif,0664,082c0a5f22ff80cc199ffabeb7dfbc26,
pub/System/TreeBrowserPlugin/virtualpersons.gif,0664,a14f267e5714c04e83431bd487e9b99d,
pub/System/TreeBrowserPlugin/xls.gif,0664,860c058ad04e4c8b340fb8505b449320,
pub/System/TreeBrowserPlugin/zip.gif,0664,7387d5d233d5840f0e1338a5ed02b9fc,
<<<< DEPENDENCIES >>>>