[BACK]Return to pathdown.sh CVS log [TXT][DIR] Up to [Development] / linux-2.4-xfs-OLD / linux / scripts

File: [Development] / linux-2.4-xfs-OLD / linux / scripts / pathdown.sh (download)

Revision 1.2, Fri Jun 25 17:32:48 1999 UTC (18 years, 4 months ago) by kanoj
Branch: MAIN
CVS Tags: XFS-1_3_0pre1, Release-1_0_0, PreRelease-0_10, Linux-2_4_5-merge, HEAD
Changes since 1.1: +0 -0 lines

initial 2.3 checkin

#!/bin/sh
UP=
DN=${PWD:?}
TP=${TOPDIR:?}

while [ ! $TP/$UP/. -ef $DN ] ;do
	UP=`basename $PWD`/$UP
	cd ..
	if [ "$PWD" = "/" ]; then echo "Lost"; exit 1; fi
done

echo $UP
exit 0