post_install.sh.cmake 629 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. osascript << EOF
  3. tell application "Finder"
  4. activate
  5. select the last Finder window
  6. reveal POSIX file "/Applications/@APPLICATION_EXECUTABLE@.app"
  7. end tell
  8. EOF
  9. # Always enable the new 10.10 finder plugin if available
  10. if [ -x "$(command -v pluginkit)" ]; then
  11. # add it to DB. This happens automatically too but we try to push it a bit harder for issue #3463
  12. pluginkit -a "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/PlugIns/FinderSyncExt.appex/"
  13. # Since El Capitan we need to sleep #4650
  14. sleep 10s
  15. # enable it
  16. pluginkit -e use -i @APPLICATION_REV_DOMAIN@.FinderSyncExt
  17. fi
  18. exit 0