prep-release.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # prep release for upload to production container
  3. # make ipxe directory to store ipxe disks
  4. mkdir -p build/ipxe
  5. # pull down upstream iPXE
  6. git clone --depth 1 https://github.com/ipxe/ipxe.git ipxe_build
  7. # copy iPXE config overrides into source tree
  8. cp ipxe/local/* ipxe_build/src/config/local/
  9. # build iPXE disks
  10. cd ipxe_build/src
  11. # get current iPXE hash
  12. IPXE_HASH=`git log -n 1 --pretty=format:"%H"`
  13. # generate iPXE disks
  14. for ipxe_config in `ls ../../ipxe/disks/`
  15. do
  16. make EMBED=../../ipxe/disks/$ipxe_config
  17. mv bin/ipxe.dsk ../../build/ipxe/$ipxe_config.dsk
  18. mv bin/ipxe.iso ../../build/ipxe/$ipxe_config.iso
  19. mv bin/ipxe.lkrn ../../build/ipxe/$ipxe_config.lkrn
  20. mv bin/ipxe.usb ../../build/ipxe/$ipxe_config.usb
  21. mv bin/undionly.kpxe ../../build/ipxe/$ipxe_config-undionly.kpxe
  22. done
  23. cd ../..
  24. # generate header for sha256-checksums file
  25. cd build/ipxe
  26. cat > netboot.xyz-sha256-checksums.txt <<EOF
  27. # netboot.xyz bootloaders generated from https://github.com/ipxe/ipxe
  28. # Git Hash: $IPXE_HASH
  29. EOF
  30. # generate sha256sums for iPXE disks
  31. for ipxe_disk in `ls .`
  32. do
  33. sha256sum $ipxe_disk >> netboot.xyz-sha256-checksums.txt
  34. done
  35. cd ../..
  36. # copy iPXE src code into build directory
  37. cp -R src/* build/