Skip to content

Commit

Permalink
fix fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Oct 12, 2023
1 parent f63f9de commit ddbe492
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ abs_dirname() {
}

capitalize() {
printf "%s" "$1" | tr '[:lower:]' '[:upper:]'
# shellcheck disable=SC2018,SC2019
printf "%s" "$1" | tr 'a-z' 'A-Z'
}

sanitize() {
Expand Down Expand Up @@ -291,7 +292,7 @@ verify_checksum() {
local checksum_command
local filename="$1"
local expected_checksum
expected_checksum="$(tr '[:upper]' '[:lower:]' <<<"$2" || true)"
expected_checksum="$(tr 'A-F' 'a-f' <<<"$2")"

# If the specified filename doesn't exist, return success
[ -e "$filename" ] || return 0
Expand All @@ -314,7 +315,7 @@ verify_checksum() {

# If the computed checksum is empty, return failure
local computed_checksum
computed_checksum="$("$checksum_command" < "$filename" | tr '[:upper:]' '[:lower:]')"
computed_checksum="$("$checksum_command" < "$filename" | tr 'A-F' 'a-f')"
[ -n "$computed_checksum" ] || return 1

if [ "$expected_checksum" != "$computed_checksum" ]; then
Expand Down

0 comments on commit ddbe492

Please sign in to comment.