[macOS] Improve configure-tccdb-macos11 script (#4002)

This commit is contained in:
Nikita Bykov
2021-09-08 09:58:52 +03:00
committed by GitHub
parent ea7f3caa06
commit f2fdcef0e0
2 changed files with 54 additions and 30 deletions

View File

@@ -173,3 +173,19 @@ brew_smart_install() {
brew install $tool_name
fi
}
configure_system_tccdb () {
local values=$1
local dbPath="/Library/Application Support/com.apple.TCC/TCC.db"
local sqlQuery="INSERT INTO access VALUES($values);"
sudo sqlite3 "$dbPath" "$sqlQuery"
}
configure_user_tccdb () {
local values=$1
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
local sqlQuery="INSERT INTO access VALUES($values);"
sqlite3 "$dbPath" "$sqlQuery"
}