Skip to content

Instantly share code, notes, and snippets.

@samnung
Last active May 1, 2016 13:03
Show Gist options
  • Save samnung/8f53983c34782a57f8d1473efe5e6f61 to your computer and use it in GitHub Desktop.
Save samnung/8f53983c34782a57f8d1473efe5e6f61 to your computer and use it in GitHub Desktop.
Shortcut to run CocoaPods v1.0 from CococaPods.app when installed older v0.39 in system
function pod1 {
# Find the CocoaPods runner if the cache variable is not set
if [[ -z "$__POD1_LOCATION" || ! -x "$__POD1_LOCATION" ]]; then
local location=`mdfind "kMDItemCFBundleIdentifier = 'org.cocoapods.CocoaPods'"`
export __POD1_LOCATION="${location}/Contents/Helpers/pod"
fi
if [[ -z "$__POD1_LOCATION" || ! -x "$__POD1_LOCATION" ]]; then
echo "Can't find CocoaPods.app" >&2
return 1
fi
${__POD1_LOCATION} $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment