summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-17 21:19:28 -0500
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-17 21:19:28 -0500
commit736ddab16e9de17297c8fdf30738194dd5fb6bb8 (patch)
treef0f65898f5670e3565faf167a4b97c9bc11cf73d
parent3cb6916ee0295cc3e9b27fe94567a6d9c5dbb5a4 (diff)
Use FindBin to locate library module and conf files.
-rwxr-xr-xdo_build.pl5
-rwxr-xr-xdo_fetch.pl3
-rwxr-xr-xdo_update.pl5
3 files changed, 11 insertions, 2 deletions
diff --git a/do_build.pl b/do_build.pl
index 057d1e5..14c6553 100755
--- a/do_build.pl
+++ b/do_build.pl
@@ -2,6 +2,9 @@
use warnings;
use strict;
+
+use FindBin;
+use lib "$FindBin::Bin";
use do_common;
#
@@ -60,7 +63,7 @@ system("mkdir -p $prefix/var/log") and do { print FH "Failed to make var/log dir
###
##
#
-my $ref = &read_config($basedir, "do_build.conf", $type);
+my $ref = &read_config($basedir, "$FindBin::Bin/do_build.conf", $type);
for (@$ref) {
my ($dir, $args) = @$_;
diff --git a/do_fetch.pl b/do_fetch.pl
index f5a25c3..cd737b4 100755
--- a/do_fetch.pl
+++ b/do_fetch.pl
@@ -2,6 +2,9 @@
use warnings;
use strict;
+
+use FindBin;
+use lib "$FindBin::Bin";
use do_common;
$| = 1;
diff --git a/do_update.pl b/do_update.pl
index d877a4b..7dc0099 100755
--- a/do_update.pl
+++ b/do_update.pl
@@ -2,6 +2,9 @@
use warnings;
use strict;
+
+use FindBin;
+use lib "$FindBin::Bin";
use do_common;
my $type = shift @ARGV;
@@ -9,7 +12,7 @@ die "Bad arguments" unless defined($type);
chdir($basedir) or die "Failed to change directory to $basedir: $!\n";
-my $ref = &read_config($basedir, "do_update.conf", $type);
+my $ref = &read_config($basedir, "$FindBin::Bin/do_update.conf", $type);
for (@$ref) {
my ($dir, $args) = @$_;