From ead4edecbb37578a44f171c56715bf44386096a0 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sat, 15 Aug 2020 23:27:55 +0200 Subject: add extras Checksum, signature, compression. --- create_arm_image.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/create_arm_image.sh b/create_arm_image.sh index d28076a..48e59b0 100755 --- a/create_arm_image.sh +++ b/create_arm_image.sh @@ -743,6 +743,25 @@ function clean() } +function generateExtra() +{ + if [ ${GEN_CHECKSUM} ] ; then + title "Generate checksum" + md5sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.md5" + sha512sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.sha512" + fi + if [ ${GEN_GZ} ] ; then + title "Image compression" + pv "${INSTALL_PATH}/${IMAGE}" | gzip -9 >"${INSTALL_PATH}/${IMAGE}.gz" + fi + if [ ${GEN_SIGN} ]; then + pushd "${INSTALL_PATH}" + gpg --sign ${IMAGE}.md5 + gpg --sign ${IMAGE}.sha512 + popd + fi +} + function preImgCreation() { error "This function is called if no sourced file about fdisk was lauched." -- cgit v1.2.1