repo.or.cz
/
davej-history.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Import 2.3.6pre2
[davej-history.git]
/
scripts
/
pathdown.sh
blob
16c17b2a806776c880cb7fd67df6ecd2b179f176
1
#!/bin/sh
2
UP
=
3
DN
=
${PWD:?}
4
TP
=
${TOPDIR:?}
5
6
while
[ !
$TP
/
$UP
/
.
-ef
$DN
] ;
do
7
UP
=
`basename
$PWD
`
/
$UP
8
cd
..
9
if
[
"
$PWD
"
=
"/"
];
then
echo
"Lost"
;
exit
1
;
fi
10
done
11
12
echo
$UP
13
exit
0