ci/init-external-repo.sh: Use regex to match macos cirrus task

This commit is contained in:
Arne Welzel 2025-03-17 10:46:24 +01:00
parent 46edc829cf
commit 919176873e

View file

@ -51,9 +51,9 @@ if [[ -n "${CIRRUS_CI}" ]] && [[ "${CIRRUS_REPO_OWNER}" == "zeek" ]] && [[ ! -d
banner "Trying to clone zeek-testing-private git repo" banner "Trying to clone zeek-testing-private git repo"
echo "${ZEEK_TESTING_PRIVATE_SSH_KEY}" >cirrus_key.b64 echo "${ZEEK_TESTING_PRIVATE_SSH_KEY}" >cirrus_key.b64
if [ "${CIRRUS_TASK_NAME}" == "macos_ventura" -o "${CIRRUS_TASK_NAME}" == "macos_sonoma" ]; then if [[ "${CIRRUS_TASK_NAME}" =~ ^macos_ ]]; then
# The base64 command provided with macOS Ventura/Sonoma requires an argument # The base64 command provided with macOS requires an argument
# to pass the input filename # to pass the input filename, while -i elsewhere is "ignore garbage".
base64 -d -i cirrus_key.b64 >cirrus_key base64 -d -i cirrus_key.b64 >cirrus_key
else else
base64 -d cirrus_key.b64 >cirrus_key base64 -d cirrus_key.b64 >cirrus_key