From efa0f61aaf84e4e2647a5140079041de96611c46 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 9 Oct 2016 23:03:19 -0700 Subject: [PATCH] [macOS] Fixups to shell functions --- dotfiles/lib/shellrc/osx.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotfiles/lib/shellrc/osx.sh b/dotfiles/lib/shellrc/osx.sh index 1c41ee73..a1b3a0c4 100644 --- a/dotfiles/lib/shellrc/osx.sh +++ b/dotfiles/lib/shellrc/osx.sh @@ -13,14 +13,14 @@ function enable_access_for_assistive_devices { local where_clause="where service='kTCCServiceAccessibility' and client='$bundle_identifier'" local search_string="SELECT * from access ${where_clause};" local values_string="VALUES('kTCCServiceAccessibility','$bundle_identifier',0,1,1,NULL)" - if test -z $(sudo sqlite3 '/Library/Application Support/com.apple.TCC/TCC.db' $search_string); + if test -z $(sudo sqlite3 '/Library/Application Support/com.apple.TCC/TCC.db' "$search_string"); then local sql_string="INSERT INTO access $values_string;" else local sql_string="UPDATE access set allowed = 1 ${where_clause};" fi - echo $sql_string - sudo sqlite3 '/Library/Application Support/com.apple.TCC/TCC.db' $sql_string + echo "$sql_string" + sudo sqlite3 '/Library/Application Support/com.apple.TCC/TCC.db' "$sql_string" } function as_user {