aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}