summaryrefslogtreecommitdiff
path: root/tests/group-names
blob: ad4d0abd439c067dac30206ae378c2c74385bd9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- sh -*-
# Set `groups' to a space-separated list of at least two groups of which
# the user is a member.

groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`}
case "$groups" in
  *' '*) ;;
  *) cat <<EOF 1>&2
$0: this test requires that you be a member of more than one group,
but running \`id -G' either failed or found just one.  If you really
are a member of at least two groups, then rerun this test with
COREUTILS_GROUPS set in your environment to the space-separated list
of group names or numbers.  E.g.,

  env COREUTILS_GROUPS='users cdrom' make check

EOF
     (exit 77); exit 77
     ;;
esac