14 lines
213 B
Text
14 lines
213 B
Text
|
# -*- mode: sh; -*-
|
||
|
local _pwd=$(pwd)
|
||
|
|
||
|
while; do
|
||
|
cd ..
|
||
|
[[ ! -d '.git' && "$(pwd)" != "/" ]] || break
|
||
|
done
|
||
|
|
||
|
if [[ "$(pwd)" == "/" ]]; then
|
||
|
cd $_pwd
|
||
|
echo 'Project root not found' >&2
|
||
|
return 1
|
||
|
fi
|