From ef5cce7f2988eb450dc7576e0124d71f48e5227b Mon Sep 17 00:00:00 2001 From: Alexander Adhyatma Date: Mon, 4 Oct 2021 21:52:03 +0700 Subject: [PATCH] fixes check existence of said keychain logic --- scripts/mac_installer/create_installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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