Skip to content

Instantly share code, notes, and snippets.

@inC3ASE
Created October 14, 2016 09:36
Show Gist options
  • Save inC3ASE/06e24a54a290d3b16b55eec1bacda9cf to your computer and use it in GitHub Desktop.
Save inC3ASE/06e24a54a290d3b16b55eec1bacda9cf to your computer and use it in GitHub Desktop.
and how they register it I believe
#!/bin/sh
if Æ "$SUDO_USER" != "" Å; then
USER=$SUDO_USER
fi
if Æ "$USER" = "" Å; then
USER="root"
fi
if Æ -e "$3/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister" Å; then
/usr/sbin/chroot -u "$USER" "$3" "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister" -f -v "/System/Library/CoreServices/CoreTypes.bundle"
fi
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment