*.pl: switch to use lib "__BASEDIR__";
commit9c7a9865d8dc4c3ede462d638ebef250831203d1
authorKyle J. McKay <mackyle@gmail.com>
Tue, 28 Nov 2017 22:07:55 +0000 (28 14:07 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 28 Nov 2017 22:07:55 +0000 (28 14:07 -0800)
treec06d6e7fd9791c9f47e03515674de5bc4597665f
parent7dc312c5fac16f0bc1d8023af16feef66a8ac3d6
*.pl: switch to use lib "__BASEDIR__";

Change all the old-style use lib lines that try to locate the
Girocco::* files to use "__BASEDIR__" instead.

The ones using @basedir@ (or "@basedir@") could not even be
syntax checked without first installing them.

The ones using "." are unnecessary (unless there's a "Girocco"
somewhere in the default Perl search path) and present an extended
attack surface if the current directory can be successfully changed.

The ones using dirname($0) require a symbolic link in the same
directory as the script and require $0 to be accurate.  Both of
which are less than optimal choices.

Instead switch to the newly supported "__BASEDIR__" which mostly
just works in a non-installed repository.  For convenience when
working with a cwd set to cgi, jobd, taskd or toolbox make sure
there is a suitable symbolic link in there from Girocco to ../Girocco
to facilitate development.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
26 files changed:
cgi/Girocco
cgi/bundles.cgi
cgi/delproj.cgi
cgi/deluser.cgi
cgi/editproj.cgi
cgi/edituser.cgi
cgi/html.cgi
cgi/mirrorproj.cgi
cgi/projlist.cgi
cgi/pwproj.cgi
cgi/regproj.cgi
cgi/reguser.cgi
cgi/tagproj.cgi
cgi/usercert.cgi
gitweb/gitweb_config.perl
jobd/jobd.pl
taskd/taskd.pl
toolbox/Girocco [new symlink]
toolbox/clean-tags.pl
toolbox/kill-stale-daemons.pl
toolbox/projtool.pl
toolbox/remirror-project.pl
toolbox/show-pack-counts.pl
toolbox/show-tags.pl
toolbox/trash-project.pl
toolbox/usertool.pl