docs-common/bin fdpsh,1.4,1.5
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Sat Feb 4 14:50:07 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3852
Modified Files:
fdpsh
Log Message:
Figure out absolute pathnames in a portable manner.
Index: fdpsh
===================================================================
RCS file: /cvs/docs/docs-common/bin/fdpsh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fdpsh 4 Feb 2006 04:18:32 -0000 1.4
+++ fdpsh 4 Feb 2006 14:49:59 -0000 1.5
@@ -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
More information about the Fedora-docs-commits
mailing list