public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests comma separated group names
@ 2013-05-20  8:29 Itaru Kitayama
  2013-05-20 11:30 ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Itaru Kitayama @ 2013-05-20  8:29 UTC (permalink / raw)
  To: xfs


[-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --]

This patch lets the -g option take multiple group names.

Signed-off-By: Itaru Kitayama <itaru.kitayama@gmail.com>

 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 ;

[-- Attachment #1.2: Type: text/html, Size: 2201 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-22 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20  8:29 [PATCH] xfstests comma separated group names Itaru Kitayama
2013-05-20 11:30 ` Dave Chinner
2013-05-20 11:42   ` Itaru Kitayama
2013-05-21  0:45     ` Dave Chinner
2013-05-21  3:45       ` Itaru Kitayama
2013-05-21  5:21         ` Dave Chinner
2013-05-22 14:12           ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox