diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-04 14:49:59 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-04 14:49:59 +0000 |
commit | 4e4143000f27054b56ade108a010b28eea693f8c (patch) | |
tree | 0b74b23f6fcf4c383a893c17620dcd39f547d80b /bin/fdpsh | |
parent | c1310f70a9c9672d7b365e2cf60daf4abc26f7da (diff) | |
download | fedora-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/fdpsh')
-rwxr-xr-x | bin/fdpsh | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 |