make ./g robust against missing bin/repo-list file
Change-Id: Ib61a679221d0eddea61358024d31c90464dccefb
This commit is contained in:
parent
4cbdfe1898
commit
79e9a64299
1 changed files with 9 additions and 2 deletions
11
g
11
g
|
@ -31,6 +31,13 @@ pushd $(dirname $0) > /dev/null
|
|||
COREDIR=$(pwd)
|
||||
popd > /dev/null
|
||||
|
||||
if test -f $COREDIR/bin/repo-list
|
||||
then
|
||||
ALLREPOS="core `cat "$COREDIR/bin/repo-list"`"
|
||||
else
|
||||
ALLREPOS=core
|
||||
fi
|
||||
|
||||
refresh_hooks()
|
||||
{
|
||||
repo=$1
|
||||
|
@ -88,7 +95,7 @@ refresh_hooks()
|
|||
|
||||
refresh_all_hooks()
|
||||
{
|
||||
repos="core $(cat "$COREDIR/bin/repo-list")"
|
||||
repos="$ALLREPOS"
|
||||
for repo in $repos ; do
|
||||
refresh_hooks $repo
|
||||
done
|
||||
|
@ -239,7 +246,7 @@ done
|
|||
# do it!
|
||||
DIRS="core $(cd $CLONEDIR ; ls)"
|
||||
if [ "$COMMAND" = "clone" ] ; then
|
||||
DIRS=$(cat "$COREDIR/bin/repo-list")
|
||||
DIRS="$ALLREPOS"
|
||||
fi
|
||||
for REPO in $DIRS ; do
|
||||
DIR="$CLONEDIR/$REPO"
|
||||
|
|
Loading…
Reference in a new issue