patch-1.3.19 linux/scripts/pathdown.sh
Next file: linux/CREDITS
Previous file: linux/scripts/hfiles.sh
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Tue Aug 15 15:07:03 1995
- Orig file:
v1.3.18/linux/scripts/pathdown.sh
- Orig date:
Thu Jan 1 02:00:00 1970
diff -u --recursive --new-file v1.3.18/linux/scripts/pathdown.sh linux/scripts/pathdown.sh
@@ -0,0 +1,13 @@
+#!/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
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this