Created
July 5, 2013 04:07
-
-
Save capnslipp/5931545 to your computer and use it in GitHub Desktop.
Removes applications from OS X's filetype association database (LaunchServices).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# @purpose: Removes applications from OS X's filetype association database (LaunchServices). | |
# Useful for .apps you'd like around but never want automatically launched. I use it for alpha/beta/developer preview versions that I like to play with, but don't want to commit to yet. | |
lsregister="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister" # or `locate -l1 lsregister` | |
argc=$# | |
if [ $argc -ne 1 ]; then | |
scriptname=`basename $0` | |
echo "Usage: $scriptname <application path>" | |
exit | |
fi | |
$lsregister -u $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment