2 ##---------------------------------------------------------------------------##
4 ## $Id: mhonarc-check,v 1.6 2002/09/15 05:05:54 ehood Exp $
6 ## Checks if mhonarc can be loaded.
7 ##---------------------------------------------------------------------------##
8 ## Copyright (C) 2002 Earl Hood <earl@earlhood.com>
10 ## This program is free software; you can redistribute it and/or modify
11 ## it under the terms of the GNU General Public License as published by
12 ## the Free Software Foundation; either version 2 of the License, or
13 ## (at your option) any later version.
15 ## This program is distributed in the hope that it will be useful,
16 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ## GNU General Public License for more details.
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 ##---------------------------------------------------------------------------##
26 package MHArc
::mhonarc_check
;
28 ##--------------------------------------------------------------------------##
30 BEGIN { die qq/CGI use FORBIDDEN!\n/ if (defined($ENV{'GATEWAY_INTERFACE'})); }
31 my $Dir; BEGIN { $Dir = `dirname $0`; chomp $Dir; }
32 use lib
"$Dir/../lib"; # Add relative lib to search path
34 ##--------------------------------------------------------------------------##
37 my $config = MHArc
::Config
->load("$Dir/../lib/config.sh");
39 ##--------------------------------------------------------------------------##
44 print "You are using MHonArc v$mhonarc::VERSION\n";
47 print qq/Unable to load MHonArc: $@\n/;
49 * If MHonArc is installed, you may need to set the MHONARC_LIB
50 * variable in lib/config.sh to the directory pathname location
51 * of MHonArc's library files.
63 ##--------------------------------------------------------------------------##
68 mhonarc-check - Checks that mharc scripts will be able to load MHonArc
76 This program does a simple check to see that an installation of mharc
77 can load the MHonArc libraries. If the check fails, the program
78 returns a non-zero exit status and prints out what can be done to
83 C<$Id: mhonarc-check,v 1.6 2002/09/15 05:05:54 ehood Exp $>
87 Earl Hood, earl@earlhood.com
89 This program is part of the mharc archiving system and comes with
90 ABSOLUTELY NO WARRANTY and may be copied only under the terms of
91 the GNU General Public License, which may be found in the mhArc