Skip to content

Instantly share code, notes, and snippets.

@takaxp
Last active February 7, 2019 07:18
Show Gist options
  • Save takaxp/bc47005471684aafe0a3357a460db4fd to your computer and use it in GitHub Desktop.
Save takaxp/bc47005471684aafe0a3357a460db4fd to your computer and use it in GitHub Desktop.
Run this script after building Emacs locally for Mojave
#!/bin/sh
file="/Applications/Emacs.app"
version=`${file}/Contents/MacOS/Emacs -batch --eval="(princ (format \"%s.%s@%s\" emacs-major-version emacs-minor-version (substring emacs-repository-version 0 10)))"`
application="Emacs"${version}""
date=$(printf %x $(date +%s))
uuid=$(/usr/bin/uuidgen)
/usr/bin/xattr -w com.apple.quarantine "0002;${date};${application};${uuid}" "${file}"
open "x-apple.systempreferences:com.apple.preference.security"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment