find_sparkle_appcast: correct appcast_found_error messages

This commit is contained in:
Vítor Galvão
2016-01-12 15:16:26 +00:00
parent eb00bf28e3
commit e328aa89bb
+2 -2
View File
@@ -55,13 +55,13 @@ fi
appcast_url="$(defaults read "${path_to_plist}" 'SUFeedURL' 2>/dev/null)"
if [[ -z "${appcast_url}" ]]; then
echo 'It appears this app does not have a Sparkle appcast.'
echo 'It appears this app does not have a Sparkle appcast'
exit 0
fi
# vaidate appcast
appcast_http_response="$(curl --silent --head --write-out '%{http_code}' "${appcast_url}" -o /dev/null)"
[[ "${appcast_http_response}" != '200' ]] && appcast_found_error "returned a non-200 (OK) HTTP response code (${appcast_http_response})."
[[ "${appcast_http_response}" != '200' ]] && appcast_found_error "returned a non-200 (OK) HTTP response code (${appcast_http_response})"
appcast_sha=$(curl --silent "${appcast_url}" | shasum --algorithm 256 | awk '{ print $1 }')
[[ "${appcast_sha}" == 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' ]] && appcast_found_error 'seems to be empty'