Remove problematic whitespace test from IPXE download verification

This commit is contained in:
Max Weiss 2021-04-27 17:38:12 -07:00
parent 964f047c1d
commit 4b3d872bb2
Signed by: maxweiss
GPG Key ID: C2D8443BA1D372DB
1 changed files with 2 additions and 2 deletions

View File

@ -18,12 +18,12 @@ function download_and_verify_ipxe()
lkrn_url=$(echo ${release_info} | jq '.[0].assets[] | select(.name=="ipxe.lkrn")' | jq -r .browser_download_url | tr -d '\n')
shasums_url=$(echo ${release_info} | jq '.[0].assets[] | select(.name=="SHA256SUMS")' | jq -r .browser_download_url | tr -d '\n')
if [[ -z $lkrn_url ]] || [[ $lkrn_url = *[^[:space:]]* ]]; then
if [[ -z $lkrn_url ]]; then
echo "download failed" > "$ipxe_path"
else
wget "${lkrn_url}" -O "$ipxe_path" || echo "download failed" > "$ipxe_path"
fi
if [[ -z $shasums_url ]] || [[ $shasums_url = *[^[:space:]]* ]]; then
if [[ -z $shasums_url ]]; then
echo "z ipxe.lkrn" > "${ipxe_path}.sha256sums"
else
wget "${shasums_url}" -O "${ipxe_path}.sha256sums" || echo "z ipxe.lkrn" > "${ipxe_path}.sha256sums"