use readlink instead of other thing
parent
161c924ef1
commit
262463b5f4
|
@ -26,14 +26,14 @@ function () {
|
||||||
|
|
||||||
# search for git dir
|
# search for git dir
|
||||||
local found=false;
|
local found=false;
|
||||||
local dir="$(realpath "$(pwd)")";
|
local dir="$(readlink -f "$(pwd)")";
|
||||||
while [[ "$dir" != "/" ]]; do
|
while [[ "$dir" != "/" ]]; do
|
||||||
if [[ -d "$dir/.git" ]]; then
|
if [[ -d "$dir/.git" ]]; then
|
||||||
found=true;
|
found=true;
|
||||||
break;
|
break;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
dir="$(realpath "$dir/..")";
|
dir="$(readlink -f "$dir/..")";
|
||||||
done;
|
done;
|
||||||
|
|
||||||
# handle git repo
|
# handle git repo
|
||||||
|
|
Loading…
Reference in New Issue