u-boot: check the produced platform_install.sh (created from functions like write_uboot_platform) for shellcheck errors

- we've some smelly stuff in write_uboot_platform for some families that we'd rather catch early
- implement small syntax fixes in setup_write_uboot_platform
This commit is contained in:
Ricardo Pardini
2024-11-22 22:07:42 +01:00
committed by Igor
parent 907c9f0531
commit a55c8bfcb2
5 changed files with 30 additions and 22 deletions

View File

@@ -414,13 +414,23 @@ function compile_uboot() {
unset uboot_postinst_base postinst_functions destination
# declare -f on non-defined function does not do anything (but exits with errors, so ignore them with "|| true")
cat <<- EOF > "$uboottempdir/usr/lib/u-boot/platform_install.sh"
cat <<- EOF > "${uboottempdir}/usr/lib/u-boot/platform_install.sh"
# Armbian u-boot install script for linux-u-boot-${BOARD}-${BRANCH} ${artifact_version}
# This file provides functions for deploying u-boot to a block device.
DIR=/usr/lib/$uboot_name
$(declare -f write_uboot_platform || true)
$(declare -f write_uboot_platform_mtd || true)
$(declare -f setup_write_uboot_platform || true)
EOF
if [[ "${SHOW_DEBUG}" == "yes" ]]; then
display_alert "Showing contents of" "usr/lib/u-boot/platform_install.sh" "info"
run_tool_batcat --file-name "usr/lib/u-boot/platform_install.sh" "${uboottempdir}/usr/lib/u-boot/platform_install.sh"
fi
display_alert "Running shellcheck" "usr/lib/u-boot/platform_install.sh" "info"
shellcheck_debian_control_scripts "${uboottempdir}/usr/lib/u-boot/platform_install.sh"
display_alert "Das U-Boot .deb package version" "${artifact_version}" "info"
# set up control file