From ee408805e2e6f5bcf9886867409a5614b63d6b09 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 17 Mar 2023 10:56:34 -0500 Subject: [PATCH] Move post-build script to configdir The base Aimee OS build does not need any post-installation tasks. Custom builds can provide a `post-build.sh` script to implement the tasks they need. For example, builds targeting Raspberry Pi devices can use this script to install the firmware files. --- post-build.sh | 10 +++------- config.txt => yellow/config.txt | 0 yellow/post-build.sh | 9 +++++++++ 3 files changed, 12 insertions(+), 7 deletions(-) rename config.txt => yellow/config.txt (100%) create mode 100644 yellow/post-build.sh diff --git a/post-build.sh b/post-build.sh index 4b1f177..9c1ae6d 100755 --- a/post-build.sh +++ b/post-build.sh @@ -5,10 +5,6 @@ set -e . "${CONFIGDIR:=${PWD}}"/config -cp -uv \ - /usr/${target}/boot/*.bin \ - /usr/${target}/boot/*.dat \ - /usr/${target}/boot/*.elf \ - /usr/${target}/usr/share/u-boot/u-boot.bin \ - config.txt \ - "$1"/efi-part/ +if [ -f "${CONFIGDIR}"/post-build.sh ]; then + . "${CONFIGDIR}"/post-build.sh +fi diff --git a/config.txt b/yellow/config.txt similarity index 100% rename from config.txt rename to yellow/config.txt diff --git a/yellow/post-build.sh b/yellow/post-build.sh new file mode 100644 index 0000000..10f74fa --- /dev/null +++ b/yellow/post-build.sh @@ -0,0 +1,9 @@ +# vim: set ft=sh sw=4 ts=4 sts=4 et : + +cp -uv \ + /usr/${target}/boot/*.bin \ + /usr/${target}/boot/*.dat \ + /usr/${target}/boot/*.elf \ + /usr/${target}/usr/share/u-boot/u-boot.bin \ + "${CONFIGDIR}"/config.txt \ + "$1"/efi-part/