Skip to content

Instantly share code, notes, and snippets.

@lexrus
Created October 22, 2012 10:39
Show Gist options
  • Save lexrus/3930851 to your computer and use it in GitHub Desktop.
Save lexrus/3930851 to your computer and use it in GitHub Desktop.
Switch keychains for InHouse & AppStore while both certifications have the same name
#!/bin/bash
export MM_KEYCHAIN=(~/Dropbox/mm.keychain)
export MM_INHOUSE_KEYCHAIN=(~/Dropbox/mm_inhouse.keychain)
cp "$MM_INHOUSE_KEYCHAIN" "$MM_INHOUSE_KEYCHAIN.ori"
security delete-keychain "$MM_INHOUSE_KEYCHAIN"
if [[ -f "$MM_KEYCHAIN.ori" ]]; then
mv "$MM_KEYCHAIN.ori" "$MM_KEYCHAIN"
fi
open "$MM_KEYCHAIN"
#!/bin/bash
export MM_KEYCHAIN=(~/Dropbox/mm.keychain)
export MM_INHOUSE_KEYCHAIN=(~/Dropbox/mm_inhouse.keychain)
cp "$MM_KEYCHAIN" "$MM_KEYCHAIN.ori"
security delete-keychain "$MM_KEYCHAIN"
if [[ -f "$MM_INHOUSE_KEYCHAIN.ori" ]]; then
mv "$MM_INHOUSE_KEYCHAIN.ori" "$MM_INHOUSE_KEYCHAIN"
fi
open "$MM_INHOUSE_KEYCHAIN"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment