__acl: avoid duplication and safer sed for last occurence replacement
This commit is contained in:
parent
8b3c84dfef
commit
7924c1339c
1 changed files with 4 additions and 2 deletions
|
@ -41,10 +41,12 @@ do
|
|||
then
|
||||
if [ "$is_dir" = '1' ]
|
||||
then
|
||||
acl="$( echo "$acl" | sed 's/X$/x/' )"
|
||||
rep=x
|
||||
else
|
||||
acl="$( echo "$acl" | sed 's/X$/-/' )"
|
||||
rep=-
|
||||
fi
|
||||
|
||||
acl="$( echo "$acl" | sed -r "s/(.*)X/\1$rep/" )"
|
||||
fi
|
||||
|
||||
if echo "$parameter" | grep -Eq '(mask|other)'
|
||||
|
|
Loading…
Reference in a new issue