Tizen 2.0 Release
[external/tizen-coreutils.git] / tests / group-names
1 # -*- sh -*-
2 # Set `groups' to a space-separated list of at least two groups of which
3 # the user is a member.
4
5 # Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 # 02110-1301, USA.
21
22 groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`}
23 case "$groups" in
24   *' '*) ;;
25   *) cat <<EOF 1>&2
26 $0: this test requires that you be a member of more than one group,
27 but running \`id -G' either failed or found just one.  If you really
28 are a member of at least two groups, then rerun this test with
29 COREUTILS_GROUPS set in your environment to the space-separated list
30 of group names or numbers.  E.g.,
31
32   env COREUTILS_GROUPS='users cdrom' make check
33
34 EOF
35      (exit 77); exit 77
36      ;;
37 esac