aboutsummaryrefslogtreecommitdiffstats
path: root/create_arm_image.sh
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2020-08-15 23:27:55 +0200
committerJybz <j.biernacki@free.fr>2020-08-15 23:27:55 +0200
commitead4edecbb37578a44f171c56715bf44386096a0 (patch)
tree596225054e0f67a711a1ac33fe932f9dc90a21bb /create_arm_image.sh
parentc5976bf6d3c0f8d82442a163ae9cd6e0f55f446f (diff)
downloadmageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar
mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.gz
mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.bz2
mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.tar.xz
mageia4arm-ead4edecbb37578a44f171c56715bf44386096a0.zip
add extras
Checksum, signature, compression.
Diffstat (limited to 'create_arm_image.sh')
-rwxr-xr-xcreate_arm_image.sh19
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."