allow running sbin scripts from any directory
This commit is contained in:
parent
8206aeaec5
commit
aaa0924dc7
18 changed files with 310 additions and 255 deletions
12
sbin/syncToCdn.pl
Normal file → Executable file
12
sbin/syncToCdn.pl
Normal file → Executable file
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -8,14 +10,16 @@
|
|||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
our $webguiRoot;
|
||||
use strict;
|
||||
use File::Basename ();
|
||||
use File::Spec;
|
||||
|
||||
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 Fcntl ':flock';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue