use_build_as_local_app 639 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. project_root="$(dirname $0)/../"
  3. killall CutBox
  4. rm -rf /Applications/CutBox.app
  5. cp -R "${project_root}/CutBox/build/CutBox.app" /Applications/
  6. open "x-apple.systempreferences:com.apple.preference.security?Privacy"
  7. cat <<EOF
  8. Add CutBox to Security & Privacy > Privacy > 'Accessibility'
  9. (You must remove it if it's already there, and re-add it, for any new version.)
  10. Please do this before continuing...
  11. Press [y] to continue (any other key will abort)
  12. EOF
  13. while :
  14. do
  15. read -rn 1 KEY <&1
  16. if [[ $KEY = "y" ]]; then
  17. break
  18. else
  19. echo ""
  20. echo "quitting..."
  21. exit 1
  22. fi
  23. done
  24. open -a /Applications/CutBox.app