diff options
author | Jybz <j.biernacki@free.fr> | 2020-08-15 23:27:55 +0200 |
---|---|---|
committer | Jybz <j.biernacki@free.fr> | 2020-08-15 23:27:55 +0200 |
commit | ead4edecbb37578a44f171c56715bf44386096a0 (patch) | |
tree | 596225054e0f67a711a1ac33fe932f9dc90a21bb | |
parent | c5976bf6d3c0f8d82442a163ae9cd6e0f55f446f (diff) | |
download | mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.gz mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.bz2 mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.xz mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.zip |
add extras
Checksum, signature, compression.
-rwxr-xr-x | create_arm_image.sh | 19 |
1 files changed, 19 insertions, 0 deletions
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." |