From 05abbba0870bebc42745f02e07daf260156db848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Wed, 19 Oct 2022 02:56:16 +0100 Subject: [PATCH] improve instalation for macOS --- Scripts/install-uvtools.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Scripts/install-uvtools.sh b/Scripts/install-uvtools.sh index b834549..8878e75 100644 --- a/Scripts/install-uvtools.sh +++ b/Scripts/install-uvtools.sh @@ -26,6 +26,7 @@ echo "- Detecting OS" if [ "${OSTYPE:0:6}" == "darwin" ]; then osVariant="osx" macOS_version="$(sw_vers -productVersion)" + appDir="/Applications/UVtools.app" if [ $(version $macOS_version) -lt $(version $macOS_least_version) ]; then echo "Error: Unable to install, UVtools requires at least macOS $macOS_least_version." @@ -42,6 +43,12 @@ if [ "${OSTYPE:0:6}" == "darwin" ]; then fi brew install --cask uvtools + + if [ -d "$appDir" ]; then + find "$appDir" -print0 | xargs -0 xattr -d com.apple.quarantine + open "$appDir" & + fi + exit 1 elif command -v apt-get &> /dev/null then