diff --git a/script/prep-release.sh b/script/prep-release.sh index aad73128..9cf62fac 100755 --- a/script/prep-release.sh +++ b/script/prep-release.sh @@ -1,6 +1,17 @@ #!/bin/bash # prep release for upload to production container +function error_check() +{ + + if [ $? -eq 1 ] + then + echo "Error encountered... failing..." + exit 1 + fi + +} + # make ipxe directory to store ipxe disks mkdir -p build/ipxe @@ -16,22 +27,30 @@ cd ipxe_build/src # get current iPXE hash IPXE_HASH=`git log -n 1 --pretty=format:"%H"` -# generate iPXE disks +# generate standard iPXE disks for ipxe_config in `ls ../../ipxe/disks/` do - make EMBED=../../ipxe/disks/$ipxe_config - make bin/ipxe.kpxe EMBED=../../ipxe/disks/$ipxe_config - # EFI doesn't like COMBOOT so turn it off before compile - sed -i s/#define IMAGE_COMBOOT/#undef IMAGE_COMBOOT/g config/local/general.h - make bin-x86_64-efi/ipxe.efi EMBED=../../ipxe/disks/$ipxe_config + make bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe EMBED=../../ipxe/disks/$ipxe_config + error_check mv bin/ipxe.dsk ../../build/ipxe/$ipxe_config.dsk mv bin/ipxe.iso ../../build/ipxe/$ipxe_config.iso mv bin/ipxe.lkrn ../../build/ipxe/$ipxe_config.lkrn mv bin/ipxe.usb ../../build/ipxe/$ipxe_config.usb mv bin/ipxe.kpxe ../../build/ipxe/$ipxe_config.kpxe mv bin/undionly.kpxe ../../build/ipxe/$ipxe_config-undionly.kpxe +done + +# generate EFI iPXE disks +for ipxe_config in `ls ../../ipxe/disks/` +do + # Remove general.h options for testing, doesn't like COMBOOT + rm config/local/general.h + make bin-x86_64-efi/ipxe.efi EMBED=../../ipxe/disks/$ipxe_config + error_check mv bin/ipxe.efi ../../build/ipxe/$ipxe_config.efi done + +# return to root cd ../.. # generate header for sha256-checksums file