File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ download_binary() {
7070 # Extract expected hash for this binary and verify
7171 local expected
7272 expected=$( grep " ^${binary_name} " " $checksum_file " | awk ' {print $1}' )
73- if [ -z " $expected " ] ; then
73+ expected= $( grep " ^ ${binary_name} " " $checksum_file " | awk ' {print $1} ' )
7474 rm -f " $dest " " $checksum_file "
7575 fail " Checksum entry for $binary_name not found in checksums.txt"
7676 fi
@@ -81,7 +81,7 @@ download_binary() {
8181 elif command -v shasum & > /dev/null; then
8282 local expected
8383 expected=$( grep " ^${binary_name} " " $checksum_file " | awk ' {print $1}' )
84- if [ -z " $expected " ] ; then
84+ expected= $( grep " ^ ${binary_name} " " $checksum_file " | awk ' {print $1} ' )
8585 rm -f " $dest " " $checksum_file "
8686 fail " Checksum entry for $binary_name not found in checksums.txt"
8787 fi
@@ -91,7 +91,8 @@ download_binary() {
9191 }
9292 else
9393 warn " Neither sha256sum nor shasum found — skipping checksum verification"
94- fi
94+ rm -f " $dest " " $checksum_file "
95+ fail " Neither sha256sum nor shasum found — cannot verify binary integrity. Install coreutils and retry."
9596
9697 rm -f " $checksum_file "
9798 chmod +x " $dest "
You can’t perform that action at this time.
0 commit comments