Skip to content

Instantly share code, notes, and snippets.

@steverichey
Created April 29, 2015 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steverichey/ed1d5c7450be0822c3d0 to your computer and use it in GitHub Desktop.
Save steverichey/ed1d5c7450be0822c3d0 to your computer and use it in GitHub Desktop.
Fix for OSX Yosemite "can't be opened" bug
#!/bin/sh
# Fixes "*.app can't be opened" errors
# Run `chmod +x` on this file and then
# move it to /usr/bin/ to make it GLOBAL
if [ $# -eq 0 ]
then
echo "No arguments supplied! Expected a path to a .app file"
elif [ -z "$1" ]
then
echo "Invalid argument supplied! Expected a path to a .app file"
elif [ ! -e "$1" ]
then
echo "Argument was not a valid file path! Expected a path to a .app file"
else
chmod +x $1/contents/macos/*
echo "execfix complete!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment