From bf31beca75005438cd964e473ef220d1735b4813 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 30 Oct 2009 02:34:19 +0100 Subject: [PATCH] get_repo_list: Do not list internal groups --- shlib.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shlib.sh b/shlib.sh index a72d030..1af4783 100644 --- a/shlib.sh +++ b/shlib.sh @@ -59,8 +59,10 @@ progress() { # List all Git repositories, with given prefix if specified, one-per-line get_repo_list() { if [ -n "$1" ]; then - cut -d : -f 1 "$cfg_chroot"/etc/group | grep "^$1" + cut -d : -f 1,3 "$cfg_chroot"/etc/group | grep "^$1" else - cut -d : -f 1 "$cfg_chroot"/etc/group - fi + cut -d : -f 1,3 "$cfg_chroot"/etc/group + fi | while IFS=: read name id; do + [ $id -lt 65536 ] || echo "$name" + done } -- 2.11.4.GIT