mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2026-01-08 16:21:34 +00:00
Compute top-of-tree for docker volumes
This commit is contained in:
committed by
Wataru Ishida
parent
b1fdd9d054
commit
c351a360ca
14
docker/tools/gitroot
Executable file
14
docker/tools/gitroot
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user