From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2226513832E for ; Thu, 21 Jul 2016 18:08:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB09421C19F; Thu, 21 Jul 2016 18:07:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3179B21C19F for ; Thu, 21 Jul 2016 18:07:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 337EC340D67 for ; Thu, 21 Jul 2016 18:07:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B267D7D0 for ; Thu, 21 Jul 2016 18:07:43 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1469123867.672613c1a37c84d7af4dc0d56b2df3a138ca5813.robbat2@gentoo> Subject: [gentoo-commits] proj/elections:master commit in: / X-VCS-Repository: proj/elections X-VCS-Files: Votify.pm countify listify statify votify X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 672613c1a37c84d7af4dc0d56b2df3a138ca5813 X-VCS-Branch: master Date: Thu, 21 Jul 2016 18:07:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ef925b80-ab97-452f-8976-348a39807f67 X-Archives-Hash: 7e07b7388fc9566ce7078f732432e288 commit: 672613c1a37c84d7af4dc0d56b2df3a138ca5813 Author: Robin H. Johnson gentoo org> AuthorDate: Thu Jul 21 17:57:47 2016 +0000 Commit: Robin H. Johnson gentoo 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 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; }