summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-04 14:49:59 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-04 14:49:59 +0000
commit4e4143000f27054b56ade108a010b28eea693f8c (patch)
tree0b74b23f6fcf4c383a893c17620dcd39f547d80b /bin
parentc1310f70a9c9672d7b365e2cf60daf4abc26f7da (diff)
downloadfedora-doc-utils-4e4143000f27054b56ade108a010b28eea693f8c.tar.gz
fedora-doc-utils-4e4143000f27054b56ade108a010b28eea693f8c.tar.xz
fedora-doc-utils-4e4143000f27054b56ade108a010b28eea693f8c.zip
Figure out absolute pathnames in a portable manner.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fdpsh11
1 files 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