allow running sbin scripts from any directory

This commit is contained in:
Graham Knop 2010-04-15 14:02:39 -05:00
parent 8206aeaec5
commit aaa0924dc7
18 changed files with 310 additions and 255 deletions

View file

@ -10,15 +10,16 @@
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
use strict;
use File::Basename ();
use File::Spec;
our $webguiRoot;
my $webguiRoot;
BEGIN {
$webguiRoot = "..";
unshift (@INC, $webguiRoot."/lib");
$webguiRoot = File::Spec->rel2abs(File::Spec->catdir(File::Basename::dirname(__FILE__), File::Spec->updir));
unshift @INC, File::Spec->catdir($webguiRoot, 'lib');
}
use strict;
use CPAN;
use Getopt::Long;
use Pod::Usage;