bin: add gv and find-parent-repo

This commit is contained in:
2020-09-07 10:30:34 +01:00
parent 589f1baa72
commit 84f9e448e3
2 changed files with 34 additions and 0 deletions

15
bin/find-parent-repo Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
TESTDIR=$(realpath .)
FOUND=0
while [ "$TESTDIR" != "/" ]
do
if [ -d $TESTDIR/.git ] ; then
FOUND=1
break
fi
TESTDIR="$TESTDIR/.."
TESTDIR=$(realpath $TESTDIR)
done
if [ $FOUND == 1 ] ; then
echo $TESTDIR
fi