aboutsummaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/functions.sh b/functions.sh
index cec3e55..677af95 100755
--- a/functions.sh
+++ b/functions.sh
@@ -714,17 +714,21 @@ function clean()
function generateExtra()
{
- if [ ${GEN_CHECKSUM} ] ; then
+ #Set values by default to false.
+ GEN_CHECKSUM=${GEN_CHECKSUM:="false"}
+ GEN_GZ=${GEN_GZ:="false"}
+ GEN_SIGN=${GEN_SIGN:="false"}
+ if ${GEN_CHECKSUM} ; then
title "Generate checksum"
md5sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.md5"
sha512sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.sha512"
sha384sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.sha3"
fi
- if [ ${GEN_GZ} ] ; then
+ if ${GEN_GZ} ; then
title "Image compression"
pv "${INSTALL_PATH}/${IMAGE}" | gzip -9 >"${INSTALL_PATH}/${IMAGE}.gz"
fi
- if [ ${GEN_SIGN} ]; then
+ if ${GEN_SIGN} ; then
pushd "${INSTALL_PATH}"
gpg --sign ${IMAGE}.md5
gpg --sign ${IMAGE}.sha512