From 49c160bf4f3e05f9c72b4c4f044026a8266d31de Mon Sep 17 00:00:00 2001 From: svxf Date: Sun, 14 Oct 2018 19:47:52 +0400 Subject: [PATCH] myfacl function --- .zprezto/abra/functions.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.zprezto/abra/functions.zsh b/.zprezto/abra/functions.zsh index ce85fbd..2ccbcbe 100644 --- a/.zprezto/abra/functions.zsh +++ b/.zprezto/abra/functions.zsh @@ -1,3 +1,16 @@ +function myfacl { + FUNCTION_PRELUDE + + if [[ ( -z $1 ) || ( -z $2 ) ]]; then + echo ':(' + return 1 + fi + + setfacl -Rb "${@:2}" + setfacl -Rm "u:$1:rwX,g:$1:rwX,o::0" "${@:2}" + setfacl -Rdm "u:$1:rwX,g:$1:rwX,o::0" "${@:2}" +} + function is_local { local HOSTNAME="$(hostname)"