mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-12-05 10:01:42 +01:00
making checksum comparison case insensitive
This commit is contained in:
parent
c30c3356e3
commit
edf384653f
1 changed files with 2 additions and 2 deletions
|
|
@ -172,11 +172,11 @@ verify_checksum() {
|
||||||
[ -e "$filename" ] || return 0
|
[ -e "$filename" ] || return 0
|
||||||
|
|
||||||
# If there's no expected checksum, return success
|
# If there's no expected checksum, return success
|
||||||
local expected_checksum="$2"
|
local expected_checksum=`echo "$2" | tr [A-Z] [a-z]`
|
||||||
[ -n "$expected_checksum" ] || return 0
|
[ -n "$expected_checksum" ] || return 0
|
||||||
|
|
||||||
# If the computed checksum is empty, return failure
|
# If the computed checksum is empty, return failure
|
||||||
local computed_checksum="$(compute_md5 < "$filename")"
|
local computed_checksum=`echo "$(compute_md5 < "$filename")" | tr [A-Z] [a-z]`
|
||||||
[ -n "$computed_checksum" ] || return 1
|
[ -n "$computed_checksum" ] || return 1
|
||||||
|
|
||||||
if [ "$expected_checksum" != "$computed_checksum" ]; then
|
if [ "$expected_checksum" != "$computed_checksum" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue