File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 8181 curl -fsSL -o "$DL_DIR/$FLUX_CHECKSUMS_FILE" "$FLUX_DOWNLOAD_URL/$FLUX_CHECKSUMS_FILE"
8282
8383 echo "Verifying checksum"
84- sum=$(openssl sha1 -sha256 "$DL_DIR/$FLUX_TARGET_FILE" | awk '{print $2}')
84+ sum=""
85+ if command -v openssl > /dev/null; then
86+ sum=$(openssl sha256 "$DL_DIR/$FLUX_TARGET_FILE" | awk '{print $2}')
87+ elif command -v sha256sum > /dev/null; then
88+ sum=$(sha256sum "$DL_DIR/$FLUX_TARGET_FILE" | awk '{print $1}')
89+ else
90+ echo "Neither openssl nor sha256sum found. Cannot calculate checksum."
91+ exit 1
92+ fi
93+
8594 expected_sum=$(grep " $FLUX_TARGET_FILE\$" "$DL_DIR/$FLUX_CHECKSUMS_FILE" | awk '{print $1}')
8695 if [ "$sum" != "$expected_sum" ]; then
8796 echo "SHA sum of ${FLUX_TARGET_FILE} does not match. Aborting."
You can’t perform that action at this time.
0 commit comments