0
0
mirror of https://github.com/bol-van/zapret.git synced 2025-06-30 18:43:05 +00:00

install_bin: remove quarantine xattr on macos

This commit is contained in:
bol-van 2025-06-01 15:30:51 +03:00
parent ab0d16f4e1
commit 9fe26c92a5

View File

@ -64,6 +64,12 @@ select_test_method()
} }
disable_antivirus()
{
# $1 - dir
[ "$UNAME" = Darwin ] && find "$dir" -maxdepth 1 -type f -perm +111 -exec xattr -d com.apple.quarantine {} \; 2>/dev/null
}
check_dir() check_dir()
{ {
local dir="$BINDIR/$1" local dir="$BINDIR/$1"
@ -71,6 +77,7 @@ check_dir()
local out local out
if [ -f "$exe" ]; then if [ -f "$exe" ]; then
if [ -x "$exe" ]; then if [ -x "$exe" ]; then
disable_antivirus "$dir"
case $TEST in case $TEST in
bash) bash)
out=$(echo 0.0.0.0 | bash -c "\"$exe"\" 2>/dev/null) out=$(echo 0.0.0.0 | bash -c "\"$exe"\" 2>/dev/null)