Skip to content

Commit

Permalink
fixes check existence of said keychain logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alexadhy committed Oct 4, 2021
1 parent 1410606 commit ef5cce7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mac_installer/create_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ EOF
fi

echo "Creating keychain and importing your certificate"
keychain_exists=$(security list-keychains | grep skywireBuild.keychain | tr -d '\n' | tr -d ' ')
keychain_exists=$(security list-keychains | grep skywireBuild | tr -d '\n' | tr -d ' ')

if [[ ${keychain_exists} != "" ]]; then
if [[ ${keychain_exists} == "" ]]; then
security create-keychain -p "$MAC_APP_KEYCHAIN_PASSWORD" skywireBuild.keychain
fi

security default-keychain -s skywireBuild.keychain

cert_exists=$(security find-certificate -e "$MAC_APP_DEV_USERNAME" skywireBuild.keychain | tr -d '\n' | tr -d ' ')
if [[ ${cert_exists} != "" ]]; then
if [[ ${cert_exists} == "" ]]; then
security import "$cert_path" -k skywireBuild.keychain -P "$MAC_APP_CERTIFICATE_PASSWORD"
fi

Expand Down

0 comments on commit ef5cce7

Please sign in to comment.