diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-06 22:05:08 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-06 22:05:08 +0300 |
commit | 217fc658ff15c7dc00e61d90b13cd84b0adc63b1 (patch) | |
tree | 7420857a95bc5ec8607f8ebaa129ff135ef48449 /vsvs-locate | |
parent | ae3ad126181f6f974941190848ed9532edbfc6c5 (diff) | |
download | vsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.tar vsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.tar.xz vsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.zip |
.
Diffstat (limited to 'vsvs-locate')
-rw-r--r-- | vsvs-locate | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vsvs-locate b/vsvs-locate index 009eccc..5015529 100644 --- a/vsvs-locate +++ b/vsvs-locate @@ -4,7 +4,7 @@ after () { test -z "${2##*$1*}" && echo -n "${2#*$1}"; } test "${1::1}" == "/" && path=$base || path="." lastpath=$1 -until test -n "$lastpath" || test -f "$path" +until test -z "$lastpath" || test -f "$path" do path="$path/${lastpath%%/*}" lastpath=$(after / "$lastpath") |