Last active
October 17, 2024 06:50
-
-
Save eric-gitta-moore/c36ed215ddf79eb6860471bda02c8bae to your computer and use it in GitHub Desktop.
Open Gatekeeper friendly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf '\e[1;40;92m' | |
clear | |
printf "All TNT releases are provided\n\tfree of charge for educational and uncommercial reasons.\n" | |
printf "Все релизы TNT предоставляются\n\tбезвозмездно для образовательных и некоммерческих целей.\n" | |
echo "" | |
echo "Press ENTER if you agree or close this window!" | |
echo "Нажмите ENTER, если вы согласны, или закройте окно!" | |
read ok | |
echo "Please wait..." | |
echo "Пожалуйста, подождите..." | |
echo "" | |
DMG=$(dirname "$0") | |
DIR=/tmp/tnt$RANDOM | |
rm -rf $DIR | |
mkdir -p $DIR | |
cp "$DMG/Manual install"/*.dmg $DIR | |
xattr -r -d com.apple.quarantine $DIR/*.dmg &>/dev/null | |
#if [ $? -ne 0 ]; then | |
# echo "Failed to add a Gatekeep exception, please try manual installation!" | |
# echo "Ошибка добавления исключения Gatekeep, установите программу вручную!" | |
# printf '\e[39m' | |
# exit 1 | |
#fi | |
mkdir -p $DIR/mount | |
hdiutil attach -owners on -quiet -noverify -mountpoint $DIR/mount $DIR/*.dmg -shadow $DIR/shadow | |
find $DIR/mount -maxdepth 1 \! -type l \! -path $DIR/mount -exec xattr -r -d com.apple.quarantine {} \; &>/dev/null | |
echo "" | |
echo "If the application fails to open wait a bit and try again!" | |
echo "Если программа не открывается, подождите немного и попробуйте снова!" | |
echo "" | |
echo "Have a nice day/night!" | |
echo "Приятного дня/вечера!" | |
(sleep 5 && hdiutil detach -force "$DMG") & | |
printf '\e[39m' | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eng. | |
To resolute Gatekeeper issues on macOS Sierra we prepared a script to automatically unlock images and programs (annoying image/application is damaged messages pretending you cannot open things). | |
In cases you prefer a manual installation the image file in this folder could be used. For that reason you might have to partially or completely disable Gatekeeper checks. | |
Option I | |
For a certain application run in Terminal: | |
sudo xattr -rd com.apple.quarantine /Applications/LockedApp.app | |
Option II | |
To disable checks globally run in Terminal: | |
sudo spctl --master-disable | |
TNT team | |
Rus. | |
Для решения проблем с Gatekeeper на macOS Sierra мы подготовили скрипт для автоматической разблокировки образов и программ (назойливые сообщения о повреждении и невозможности открытия). | |
В случае, если вы предпочитаете ручную установку, вы можете воспользоваться образом в данной папке. В таком случае вам может понадобится частичное отключение проверок Gatekeeper. | |
Вариант I | |
Для конкретной программы выполните в терминале: | |
sudo xattr -rd com.apple.quarantine /Applications/LockedApp.app | |
Вариант II | |
Для отключения проверок глобально выполните в терминале: | |
sudo spctl --master-disable | |
TNT team |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment