coreutils/tests/group-names
2005-04-18 23:33:10 +00:00

21 lines
627 B
Bash

# -*- 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