mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-26 01:37:04 +00:00
15 lines
180 B
Bash
Executable File
15 lines
180 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test $# -gt 0; then
|
|
dir=$(realpath $1)
|
|
else
|
|
dir=$(pwd)
|
|
fi
|
|
while test $dir != /; do
|
|
if test -d $dir/.git; then
|
|
echo $dir
|
|
break
|
|
fi
|
|
dir=${dir%/*}
|
|
done
|