View | Details | Raw Unified | Return to bug 17496
Collapse All | Expand All

(-)a/install-CPAN.pl (-46 lines)
Lines 1-45 Link Here
1
# cpan_install.pl - Install prerequisites from CPAN then Koha
2
3
($ARGV[0] =~ /koha-.*z/) || die "
4
 Run this as the CPAN-owning user (usually root) with:
5
   perl $0 path/to/koha.tgz
6
";
7
8
# Copyright 2007 MJ Ray
9
#
10
# This file is part of Koha.
11
#
12
# Koha is free software; you can redistribute it and/or modify it
13
# under the terms of the GNU General Public License as published by
14
# the Free Software Foundation; either version 3 of the License, or
15
# (at your option) any later version.
16
#
17
# Koha is distributed in the hope that it will be useful, but
18
# WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU General Public License for more details.
21
#
22
# You should have received a copy of the GNU General Public License
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
#
25
# Current maintainer MJR http://mjr.towers.org.uk/
26
27
# Create a fake CPAN location for koha
28
use CPAN;
29
CPAN::Config->load;
30
$cpan = $CPAN::Config->{cpan_home};
31
mkdir $cpan.'/sources/authors/id';
32
mkdir $cpan.'/sources/authors/id/K';
33
mkdir $cpan.'/sources/authors/id/K/KO';
34
mkdir $cpan.'/sources/authors/id/K/KO/KOHA';
35
36
# Move the tarball to it
37
$koha = $ARGV[0];
38
( rename $koha,$cpan.'/sources/authors/id/K/KO/KOHA/'.$koha ) ||
39
die 'Cannot move koha distribution into position.
40
This may be due to an unconfigured CPAN or running as the wrong user.
41
To configure cpan, try perl -MCPAN -e shell
42
Installation aborted';
43
44
# Start the main CPAN install routine
45
CPAN::install('KOHA/'.$koha);
46
- 

Return to bug 17496