From d7e46789a98cc040201630b4fb47a2ff19de1b1f Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sat, 17 Sep 2016 20:19:14 -0400 Subject: [PATCH] Run: employ $FindBin::Bin to find bin paths github: fixes #14 --- UnixBench/Run | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/UnixBench/Run b/UnixBench/Run index 3a7cec7..047a227 100755 --- a/UnixBench/Run +++ b/UnixBench/Run @@ -5,6 +5,7 @@ use strict; use POSIX qw(strftime); use Time::HiRes; use IO::Handle; +use FindBin; ############################################################################ @@ -83,21 +84,19 @@ my $cCompiler = 'gcc'; # Establish full paths to directories. These need to be full pathnames # (or do they, any more?). They can be set in env. -# variables whose names are the first parameter to getDir() below. -my $BASEDIR = `pwd`; -chomp($BASEDIR); +# variable names are the first parameter to getDir() below. # Directory where the test programs live. -my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms"); +my $BINDIR = getDir('UB_BINDIR', $FindBin::Bin . "/pgms"); # Temp directory, for temp files. -my $TMPDIR = getDir('UB_TMPDIR', $BASEDIR . "/tmp"); +my $TMPDIR = getDir('UB_TMPDIR', $FindBin::Bin . "/tmp"); # Directory to put results in. -my $RESULTDIR = getDir('UB_RESULTDIR', $BASEDIR . "/results"); +my $RESULTDIR = getDir('UB_RESULTDIR', $FindBin::Bin . "/results"); # Directory where the tests are executed. -my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir"); +my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir"); ############################################################################