mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2025-05-11 09:06:30 +08:00
14 lines
180 B
Bash
14 lines
180 B
Bash
#!/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
|