This patch lets the -g option take multiple group names.
Signed-off-By: Itaru Kitayama <itaru.kitayama@xxxxxxxxx>
check | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/check b/check
index a79747e..0e0f208 100755
--- a/check
+++ b/check
@@ -164,18 +164,19 @@ while [ $# -gt 0 ]; do
-nfs) FSTYP=nfs ;;
-g) group=$2 ; shift ;
- group_list=$(get_group_list $group)
- if [ -z "$group_list" ]; then
- echo "Group \"$group\" is empty or not defined?"
- exit 1
- fi
-
- [ ! -s $tmp.list ] && touch $tmp.list
- for t in $group_list; do
- grep -s "^$t\$" $tmp.list >/dev/null || \
- echo "$t" >>$tmp.list
+ for g in ${group//,/ }; do
+ group_list=$(get_group_list $g)
+ if [ -z "$group_list" ]; then
+ echo "Group \"$g\" is empty or not defined?"
+ exit 1
+ fi
+
+ [ ! -s $tmp.list ] && touch $tmp.list
+ for t in $group_list; do
+ grep -s "^$t\$" $tmp.list >/dev/null || \
+ echo "$t" >>$tmp
+ done
done
-
;;
-x) xgroup=$2 ; shift ;
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs