diff options
author | nl6720 <nl6720@gmail.com> | 2020-07-12 16:28:38 +0300 |
---|---|---|
committer | nl6720 <nl6720@gmail.com> | 2020-07-12 16:28:38 +0300 |
commit | 51170c53520057d0dbef415974fbfeed008c2a6a (patch) | |
tree | 0ab2ef69088e44a1be868be71577b53e3233b0c4 /configs/releng/build.sh | |
parent | e2032db4e74c66d3f8bcba97497ccb5fff88df4b (diff) | |
download | archiso32-51170c53520057d0dbef415974fbfeed008c2a6a.tar.xz |
Don't hardcode packages in build.sh
Move all required packages to packages.x86_64.
Test file availability before copying them.
Diffstat (limited to 'configs/releng/build.sh')
-rwxr-xr-x | configs/releng/build.sh | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 51401ed..c787d30 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -59,20 +59,16 @@ make_pacman_conf() { "${script_path}/pacman.conf" > "${work_dir}/pacman.conf" } -# Base installation, plus needed packages (airootfs) +# Base installation (airootfs) make_basefs() { if [ -n "${verbose}" ]; then mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init - mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \ - -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh" install else mkarchiso -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init - mkarchiso -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \ - -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh" install fi } -# Additional packages (airootfs) +# Packages (airootfs) make_packages() { if [ -n "${verbose}" ]; then mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \ @@ -141,15 +137,21 @@ make_boot() { # Add other aditional/extra files to ${install_dir}/boot/ make_boot_extra() { - cp "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest" - cp "${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt" \ - "${work_dir}/iso/${install_dir}/boot/memtest.COPYING" - cp "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img" - cp "${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/LICENSE" \ - "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE" - cp "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" - cp "${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/LICENSE" \ - "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE" + if [[ -e "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" ]]; then + cp "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest" + cp "${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt" \ + "${work_dir}/iso/${install_dir}/boot/memtest.COPYING" + fi + if [[ -e "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" ]]; then + cp "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img" + cp "${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/LICENSE" \ + "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE" + fi + if [[ -e "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" ]]; then + cp "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" + cp "${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/LICENSE" \ + "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE" + fi } # Prepare /${install_dir}/boot/syslinux |