diff options
-rwxr-xr-x | resources/scripts/helpers/build/roms/withgrub_helper | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper index 4542bc7..7c16b43 100755 --- a/resources/scripts/helpers/build/roms/withgrub_helper +++ b/resources/scripts/helpers/build/roms/withgrub_helper @@ -20,7 +20,7 @@ # # This script assumes that the working directory is the root -# of libreboot_src or git +# of git or release archive [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e @@ -39,7 +39,7 @@ printf "GRUB Helper script: build ROM images for '%s'\n" "${boardtarget}" cd "coreboot/" if [ -f "../version" ]; then - # _src release archive is being used + # release archive is being used version="$(cat ../version)" else # git repo is being used @@ -48,7 +48,6 @@ fi printf '%s\n' "${version}" >"lbversion" # Build ROM images with text-mode and corebootfb modes. -# --------------------------------------------------------------------------------------------------------------- if [ "${boardtarget}" = "qemu_i440fx_piix4" ] || [ "${boardtarget}" = "qemu_q35_ich9" ] then @@ -127,22 +126,20 @@ do rm -f "${boardtarget}_${romtype}.rom" done -# Now we clean up and prepare the bin directory containing all the images -# ---------------------------------------------------------------------------------------------------------------------------- +# Clean up and prepare bin/ containing all ROM images -# prepare directory for new ROM images +# move ROM images into the newly created directory rm -Rf "${boardtarget:?}/" mkdir "${boardtarget}/" -# move the ROM images into the newly created directory mv "${boardtarget}"*.rom "${boardtarget}/" -# delete the old ROM images from ../bin +# delete old ROM images rm -Rf "../bin/grub/${boardtarget}/" -# now put the new ROM images in ./bin/grub/ -[ ! -d "../bin/grub/" ] && mkdir -p "../bin/grub/" +# put new ROM images in ../bin/grub/ +[ -d "../bin/grub/" ] || mkdir -p "../bin/grub/" mv "${boardtarget}/" "../bin/grub/" -# libreboot version file no longer needed +# version info file no longer needed rm -f "lbversion" # go back to main source directory |