commit: 672613c1a37c84d7af4dc0d56b2df3a138ca5813
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 21 17:57:47 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 17:57:47 2016 +0000
URL: https://gitweb.gentoo.org/proj/elections.git/commit/?id=672613c1
Resolve symlinks to find the correct elections directory.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Votify.pm | 2 +-
countify | 5 +++--
listify | 5 +++--
statify | 5 +++--
votify | 5 +++--
5 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/Votify.pm b/Votify.pm
index 8e0fe1a..e09d279 100644
--- a/Votify.pm
+++ b/Votify.pm
@@ -19,7 +19,7 @@ use strict;
use warnings;
our $datefmt = '%Y-%m-%d %H:%M:%S UTC';
-our ($basedir) = List::Util::first { -d $_ } ('/etc/elections',
dirname(__FILE__));
+our ($basedir) = List::Util::first { -d $_ } ('/etc/elections',
dirname(abs_path(__FILE__)));
(our $zero = $0) =~ s,.*/,,;
our $version = '1.6';
diff --git a/countify b/countify
index 9f3e6f0..13618a4 100755
--- a/countify
+++ b/countify
@@ -12,8 +12,9 @@ BEGIN {
if(-f '/etc/elections/Votify.pm') {
$dirname = '/etc/elections';
} else {
- use File::Basename;
- $dirname = dirname(__FILE__);
+ use Cwd qw(abs_path);
+ use File::Basename qw(dirname);
+ $dirname = dirname(abs_path(__FILE__));
}
push @INC, $dirname;
}
diff --git a/listify b/listify
index 7ca2bc3..346f70a 100755
--- a/listify
+++ b/listify
@@ -12,8 +12,9 @@ BEGIN {
if(-f '/etc/elections/Votify.pm') {
$dirname = '/etc/elections';
} else {
- use File::Basename;
- $dirname = dirname(__FILE__);
+ use Cwd qw(abs_path);
+ use File::Basename qw(dirname);
+ $dirname = dirname(abs_path(__FILE__));
}
push @INC, $dirname;
}
diff --git a/statify b/statify
index a26a066..752c78d 100755
--- a/statify
+++ b/statify
@@ -13,8 +13,9 @@ BEGIN {
if(-f '/etc/elections/Votify.pm') {
$dirname = '/etc/elections';
} else {
- use File::Basename;
- $dirname = dirname(__FILE__);
+ use Cwd qw(abs_path);
+ use File::Basename qw(dirname);
+ $dirname = dirname(abs_path(__FILE__));
}
push @INC, $dirname;
}
diff --git a/votify b/votify
index 4fb688d..c34fed2 100755
--- a/votify
+++ b/votify
@@ -12,8 +12,9 @@ BEGIN {
if(-f '/etc/elections/Votify.pm') {
$dirname = '/etc/elections';
} else {
- use File::Basename;
- $dirname = dirname(__FILE__);
+ use Cwd qw(abs_path);
+ use File::Basename qw(dirname);
+ $dirname = dirname(abs_path(__FILE__));
}
push @INC, $dirname;
}