aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-10-06 14:41:33 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-10-06 14:41:33 +0300
commit849113e10be0600d8260d3207eb35914e7b5939c (patch)
treed9de59d74157db8624d4b734434fa6ef3eb9ad2f
parent60ef9ad5e3eac003c8f760335d01bcd49c4abe14 (diff)
downloadlinaro-git-tools-849113e10be0600d8260d3207eb35914e7b5939c.tar.gz
gerrit-admin: list_projs: By default, list all projects.
Change-Id: Ie853a0bcce6484b476d71bb10acf01e04d77d0c7
-rwxr-xr-xgerrit/gerrit-admin6
1 files changed, 5 insertions, 1 deletions
diff --git a/gerrit/gerrit-admin b/gerrit/gerrit-admin
index 4ccd7bd..671e065 100755
--- a/gerrit/gerrit-admin
+++ b/gerrit/gerrit-admin
@@ -11,7 +11,11 @@ PORT=-p29418
function list_projs() {
# List projects matching grep extended pattern (i.e. normal regexp)
- for repository in `ssh $PORT $GERRIT_URL gerrit ls-projects | grep -E $1`; do
+ regex=$1
+ if [ -z "$regex" ]; then
+ regex='.*'
+ fi
+ for repository in `ssh $PORT $GERRIT_URL gerrit ls-projects | grep -E "$regex"`; do
echo $repository
done
}