Skip to content

Commit

Permalink
Handle shasum checking for HookOS > 0.8.1:
Browse files Browse the repository at this point in the history
Releases of HookOS > 0.8.1 provide more binaries.
We only need the hook_aarch64 and hook_x86_64
binaries so we filter out the rest.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed May 2, 2024
1 parent 20793d4 commit 48bc9bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tinkerbell/stack/templates/hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ data:
echo "${f}"
wget -P "${tmp_dir}" "${f}"
done
(cd "${tmp_dir}" && sha512sum -c checksum.txt)
# releases of HookOS > 0.8.1 provide more binaries.
# We only need the hook_aarch64 and hook_x86_64 binaries so we filter out the rest.
(cd "${tmp_dir}" && sed -i '/hook_x86_64\|hook_aarch64/!d' checksum.txt && sha512sum -c checksum.txt)
mv "${tmp_dir}"/checksum.txt .
for f in ${tmp_dir}/*.tar.gz; do tar --no-same-permissions --overwrite -ozxvf "${f}" && rm -f "${f}"; done
rm -rf "${tmp_dir}"
Expand Down

0 comments on commit 48bc9bd

Please sign in to comment.