public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3232] Fix PR 90142: contrib/download_prerequisites uses test == Date: Mon, 30 Aug 2021 20:54:05 +0000 (GMT) [thread overview] Message-ID: <20210830205405.421223858D35@sourceware.org> (raw) https://gcc.gnu.org/g:79a017c412b412f26ec39e0ada75e247fcff5611 commit r12-3232-g79a017c412b412f26ec39e0ada75e247fcff5611 Author: Andrew Pinski <apinski@marvell.com> Date: Mon Aug 30 20:30:41 2021 +0000 Fix PR 90142: contrib/download_prerequisites uses test == Since == is not portable, it is better to use = in contrib/ download_prerequisites. The only place == was used is inside the function md5_check which is used only on Mac OS X. Tested on Mac OS X as: ./contrib/download_prerequisites --md5 Both with all files having the correct checksum and one with a broken one. contrib/ChangeLog: * download_prerequisites (md5_check): Replace == inside test with = to be more portable. Diff: --- contrib/download_prerequisites | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites index 8f69b61f5a9..11c283ecb1a 100755 --- a/contrib/download_prerequisites +++ b/contrib/download_prerequisites @@ -113,7 +113,7 @@ md5_check() { md5_checksum_output=$(md5 -r "${file_to_check}") # Grab the text before the first space md5_checksum_detected="${md5_checksum_output%% *}" - [ "${md5_checksum_expected}" == "${md5_checksum_detected}" ] \ + [ "${md5_checksum_expected}" = "${md5_checksum_detected}" ] \ || die "Cannot verify integrity of possibly corrupted file ${file_to_check}" echo "${file_to_check}: OK" }
reply other threads:[~2021-08-30 20:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210830205405.421223858D35@sourceware.org \ --to=pinskia@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).