diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-11-17 21:19:28 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-11-17 21:19:28 -0500 |
commit | 736ddab16e9de17297c8fdf30738194dd5fb6bb8 (patch) | |
tree | f0f65898f5670e3565faf167a4b97c9bc11cf73d | |
parent | 3cb6916ee0295cc3e9b27fe94567a6d9c5dbb5a4 (diff) |
Use FindBin to locate library module and conf files.
-rwxr-xr-x | do_build.pl | 5 | ||||
-rwxr-xr-x | do_fetch.pl | 3 | ||||
-rwxr-xr-x | do_update.pl | 5 |
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) = @$_; |