urchin_root
This commit is contained in:
parent
b8bd097f5c
commit
e9d6b73dbd
6
urchin
6
urchin
@ -28,12 +28,14 @@ urchin_root() {
|
||||
|
||||
if ! test -e "$current"; then
|
||||
echo "$current: No such file or directory">&2
|
||||
exit 1
|
||||
return 1
|
||||
elif test -f "$current"; then
|
||||
urchin_root "$(dirname "$current")" "$orig"
|
||||
elif test -d "$current"/.urchin; then
|
||||
echo "$current"
|
||||
elif test "$(readlink -f "$current")" = /; then
|
||||
elif test "$(readlink -f "$current")" = / ||
|
||||
echo "$current" | grep '^\.' ; then
|
||||
# Stop traversing upwards at / and at hidden directories.
|
||||
if test -d "$orig"; then
|
||||
origdir="$orig"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user