diff options
author | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2016-06-19 12:13:03 +0000 |
---|---|---|
committer | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2016-06-19 12:13:03 +0000 |
commit | d485ef42ae4a6374e6215a3fa3e70d2ad06a4085 (patch) | |
tree | fe70a4111696c8f95c517b29115e2ca48e189a17 /listify | |
parent | Allow running votify outside of /etc/elections and the repository dir. (diff) | |
download | elections-d485ef42ae4a6374e6215a3fa3e70d2ad06a4085.tar.gz elections-d485ef42ae4a6374e6215a3fa3e70d2ad06a4085.tar.bz2 elections-d485ef42ae4a6374e6215a3fa3e70d2ad06a4085.zip |
Allow running listify and statify outside of /etc/elections and the repository dir.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Diffstat (limited to 'listify')
-rwxr-xr-x | listify | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -8,11 +8,14 @@ # BEGIN { + my $dirname; if(-f '/etc/elections/Votify.pm') { - push @INC, '/etc/elections'; + $dirname = '/etc/elections'; } else { - push @INC, '.' if -f 'Votify.pm'; + use File::Basename; + $dirname = dirname(__FILE__); } + push @INC, $dirname; } use POSIX; |