diff options
author | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2016-06-19 12:05:35 +0000 |
---|---|---|
committer | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2016-06-19 12:05:35 +0000 |
commit | feb500c197990874101ae84aa51a6b718e96ae79 (patch) | |
tree | 53ee700c2fec3e779303d800b2410f128f8cf40c /votify | |
parent | Prepare the council-201606 election. (diff) | |
download | elections-feb500c197990874101ae84aa51a6b718e96ae79.tar.gz elections-feb500c197990874101ae84aa51a6b718e96ae79.tar.bz2 elections-feb500c197990874101ae84aa51a6b718e96ae79.zip |
Allow running votify outside of /etc/elections and the repository dir.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Diffstat (limited to 'votify')
-rwxr-xr-x | votify | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -7,13 +7,15 @@ # votify: generate, verify and submit voting ballots for trustee elections # -#BEGIN { push @INC, (getpwnam 'fox2mike')[7].'/elections' } 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; |