diff options
author | Alexei Sorokin <sor.alexei@meowr.ru> | 2022-11-29 23:00:51 +0300 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2022-11-29 20:26:35 +0000 |
commit | ec082429ab35a45d8a362703c26932206b5b1747 (patch) | |
tree | 185414f3151dcceef6c2442e2ebb1045a71f2a01 /resources/scripts/build/boot | |
parent | 7c5334ca0e65d4e0df377b1e6e07b18e6dbe6af2 (diff) |
scripts: avoid relying on spaces from sha1sum output
Diffstat (limited to 'resources/scripts/build/boot')
-rwxr-xr-x | resources/scripts/build/boot/roms_helper | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 06820b43..40c0f394 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -230,10 +230,8 @@ rm -f "${romdir}"/* if [ "${payload_grub}" = "y" ] || [ "${payload_seabios_withgrub}" = "y" ]; then if [ -f "payload/grub/grub_usqwerty.cfg" ]; then - grubrefchecksum="$(sha1sum resources/grub/config/grub.cfg)" - grubrefchecksum="${grubrefchecksum% resources/grub/config/grub.cfg}" - grubbuildchecksum="$(sha1sum payload/grub/grub_usqwerty.cfg)" - grubbuildchecksum="${grubbuildchecksum% payload/grub/grub_usqwerty.cfg}" + grubrefchecksum="$(sha1sum resources/grub/config/grub.cfg | awk '{print $1}')" + grubbuildchecksum="$(sha1sum payload/grub/grub_usqwerty.cfg | awk '{print $1}')" if [ "${grubrefchecksum}" != "${grubbuildchecksum}" ]; then rm -Rf payload/grub/ printf "Changes detected to GRUB. Re-building now:\n" |