diff --git a/scripts/mac_installer/create_installer.sh b/scripts/mac_installer/create_installer.sh index d40f0b4505..29365b23f3 100755 --- a/scripts/mac_installer/create_installer.sh +++ b/scripts/mac_installer/create_installer.sh @@ -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