Loading bin/ruby-build +5 −3 Original line number Diff line number Diff line Loading @@ -247,8 +247,6 @@ compute_md5() { } verify_checksum() { # If there's no SHA2 support, return success [ -n "$HAS_SHA2_SUPPORT" ] || return 0 local checksum_command="compute_sha2" # If the specified filename doesn't exist, return success Loading @@ -256,7 +254,7 @@ verify_checksum() { [ -e "$filename" ] || return 0 # If there's no expected checksum, return success local expected_checksum=`echo "$2" | tr [A-Z] [a-z]` local expected_checksum="$(echo "$2" | tr [A-Z] [a-z])" [ -n "$expected_checksum" ] || return 0 case "${#expected_checksum}" in Loading @@ -264,6 +262,10 @@ verify_checksum() { [ -n "$HAS_MD5_SUPPORT" ] || return 0 checksum_command="compute_md5" ;; 64) # SHA2 256 [ -n "$HAS_SHA2_SUPPORT" ] || return 0 checksum_command="compute_sha2" ;; esac # If the computed checksum is empty, return failure Loading Loading
bin/ruby-build +5 −3 Original line number Diff line number Diff line Loading @@ -247,8 +247,6 @@ compute_md5() { } verify_checksum() { # If there's no SHA2 support, return success [ -n "$HAS_SHA2_SUPPORT" ] || return 0 local checksum_command="compute_sha2" # If the specified filename doesn't exist, return success Loading @@ -256,7 +254,7 @@ verify_checksum() { [ -e "$filename" ] || return 0 # If there's no expected checksum, return success local expected_checksum=`echo "$2" | tr [A-Z] [a-z]` local expected_checksum="$(echo "$2" | tr [A-Z] [a-z])" [ -n "$expected_checksum" ] || return 0 case "${#expected_checksum}" in Loading @@ -264,6 +262,10 @@ verify_checksum() { [ -n "$HAS_MD5_SUPPORT" ] || return 0 checksum_command="compute_md5" ;; 64) # SHA2 256 [ -n "$HAS_SHA2_SUPPORT" ] || return 0 checksum_command="compute_sha2" ;; esac # If the computed checksum is empty, return failure Loading