diff --git a/.checkpackageignore b/.checkpackageignore index ce638a7c39..207d72fd20 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -44,7 +44,6 @@ board/lego/ev3/post-image.sh Shellcheck board/lemaker/bananapro/patches/linux/0001-arch-arm-boot-dts-sun7i-a20-bananapro.dts-disable-00.patch lib_patch.Upstream board/lemaker/bananapro/post-build.sh Shellcheck board/lemaker/bananapro/post-image.sh Shellcheck -board/mender/x86_64/post-image-efi.sh lib_shellscript.ConsecutiveEmptyLines board/minnowboard/post-build.sh Shellcheck board/nexbox/a95x/post-build.sh Shellcheck board/nexbox/a95x/post-image.sh Shellcheck diff --git a/board/mender/x86_64/post-build.sh b/board/mender/x86_64/post-build.sh index 23d1120d45..bc4f4b8f11 100755 --- a/board/mender/x86_64/post-build.sh +++ b/board/mender/x86_64/post-build.sh @@ -3,7 +3,7 @@ set -e DEVICE_TYPE="buildroot-x86_64" ARTIFACT_NAME="1.0" -function parse_args { +parse_args() { local o O opts o='a:o:d:' O='artifact-name:,data-part-size:,device-type:' @@ -28,8 +28,8 @@ function parse_args { done } - # Create a persistent directory to mount the data partition at. -function mender_fixup { +# Create a persistent directory to mount the data partition at. +mender_fixup() { pushd "${TARGET_DIR}" if [[ -L var/lib/mender ]]; then rm var/lib/mender @@ -44,7 +44,7 @@ function mender_fixup { popd } -function main { +main() { parse_args "${@}" mender_fixup echo "device_type=${DEVICE_TYPE}" > "${TARGET_DIR}/etc/mender/device_type" diff --git a/board/mender/x86_64/post-image-efi.sh b/board/mender/x86_64/post-image-efi.sh index 97b9e06d21..073b18c972 100755 --- a/board/mender/x86_64/post-image-efi.sh +++ b/board/mender/x86_64/post-image-efi.sh @@ -5,9 +5,8 @@ DATA_PART_SIZE="32M" DEVICE_TYPE="buildroot-x86_64" ARTIFACT_NAME="1.0" - # Parse arguments. -function parse_args { +parse_args() { local o O opts o='a:o:d:' O='artifact-name:,data-part-size:,device-type:' @@ -32,7 +31,7 @@ function parse_args { } # Create the data partition -function make_data_partition { +make_data_partition() { "${HOST_DIR}/sbin/mkfs.ext4" \ -F \ -r 1 \ @@ -42,9 +41,8 @@ function make_data_partition { "${BINARIES_DIR}/data-part.ext4" "${DATA_PART_SIZE}" } - # Create a mender image. -function generate_mender_image { +generate_mender_image() { echo "Creating ${BINARIES_DIR}/${DEVICE_TYPE}-${ARTIFACT_NAME}.mender" "${HOST_DIR}/bin/mender-artifact" \ --compression lzma \ @@ -55,13 +53,12 @@ function generate_mender_image { -o "${BINARIES_DIR}/${DEVICE_TYPE}-${ARTIFACT_NAME}.mender" } - -function generate_image { +generate_image() { sh support/scripts/genimage.sh -c "${BOARD_DIR}/genimage-efi.cfg" } # Main function. -function main { +main() { parse_args "${@}" make_data_partition generate_image