From 4e4143000f27054b56ade108a010b28eea693f8c Mon Sep 17 00:00:00 2001 From: Tommy Reynolds Date: Sat, 4 Feb 2006 14:49:59 +0000 Subject: Figure out absolute pathnames in a portable manner. --- bin/fdpsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/fdpsh b/bin/fdpsh index 71b3544..3ee3bd1 100755 --- a/bin/fdpsh +++ b/bin/fdpsh @@ -11,13 +11,16 @@ # accepted from stdin. ######################################################################## ME=`basename $0` -FDPBINDIR=`dirname $0` USAGE="usage: ${ME} [-c cmd] [file [arg..]]" +# Figure out absolute pathname to where we live +FDPBINDIR=`dirname $0` +case "${FDPBINDIR}" in +/* ) ;; +* ) FDPBINDIR=`/bin/pwd`/${FDPBINDIR};; +esac # PATH=${FDPBINDIR}:${PATH} export PATH -# This change keeps pathnames from growing out of control -FDPDIR=$(pushd ${FDPBINDIR}/../.. 2>&1 >/dev/null \ - && pwd && popd 2>&1 >/dev/null) export FDPDIR +FDPDIR=${FDPBINDIR}/../.. export FDPDIR SHELL=${FDPBINDIR}/${ME} export SHELL # FDPLOG=/tmp/fdpsh.log -- cgit