diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-08-30 20:30:41 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-08-30 20:53:19 +0000 |
commit | 79a017c412b412f26ec39e0ada75e247fcff5611 (patch) | |
tree | 46d6409e3cf39f49dbff77aba8f54e3107f9fff5 /contrib | |
parent | e18e56c76be35e6a799e07a01c24e0fff3eb1978 (diff) | |
download | gcc-79a017c412b412f26ec39e0ada75e247fcff5611.zip gcc-79a017c412b412f26ec39e0ada75e247fcff5611.tar.gz gcc-79a017c412b412f26ec39e0ada75e247fcff5611.tar.bz2 |
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.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/download_prerequisites | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites index 8f69b61..11c283e 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" } |