t/t1304: make a second colon optional in the mask ACL check
authorBrandon Casey <redacted>
Mon, 15 Mar 2010 17:14:37 +0000 (12:14 -0500)
committerJunio C Hamano <redacted>
Wed, 17 Mar 2010 02:06:01 +0000 (19:06 -0700)
Solaris only uses one colon in the listing of the ACL mask, Linux uses two,
so substitute egrep for grep and make the second colon optional.

The -q option for Solaris 7's /usr/xpg4/bin/egrep does not appear to be
implemented, so redirect output to /dev/null.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t1304-default-acl.sh

index 85351aea249bf0cca160355ace327e352b9852d4..055ad00f778eda1de02a418bbc602e580acdaca1 100755 (executable)
@@ -25,7 +25,7 @@ check_perms_and_acl () {
        getfacl "$1" > actual &&
        grep -q "user:root:rwx" actual &&
        grep -q "user:${LOGNAME}:rwx" actual &&
-       grep -q "mask::r--" actual &&
+       egrep "mask::?r--" actual > /dev/null 2>&1 &&
        grep -q "group::---" actual || false
 }
 
git clone https://git.99rst.org/PROJECT