mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
pgit.sh: Another attempt on guessing project directory
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c17142388c
commit
1481fd2df8
1 changed files with 4 additions and 6 deletions
|
|
@ -25,12 +25,10 @@ config()
|
|||
{
|
||||
# guess pdir
|
||||
pdir=`pwd`
|
||||
if [ `ls -d $pdir/*/.git 2>/dev/null | wc -w` -lt 3 ]; then
|
||||
while [ `basename $pdir` != proj ]; do
|
||||
[ "$pdir" = / ] && fatal "didn't find \"proj\" in directory components"
|
||||
pdir=`dirname $pdir`
|
||||
done
|
||||
fi
|
||||
while [ `cat $pdir/CVS/Repository 2>/dev/null` != proj ]; do
|
||||
[ "$pdir" = / ] && fatal "didn't find \"proj\" in directory components"
|
||||
pdir=`dirname $pdir`
|
||||
done
|
||||
pdirs=`(cd $pdir; ls -d */.git | sed 's%/.git%%')`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue