aboutsummaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
authorJybz <j.biernacki+mga@free.fr>2020-11-19 11:33:01 +0100
committerJybz <j.biernacki+mga@free.fr>2020-11-19 11:33:01 +0100
commitf090cffedd995cae04a1ed2823eb9fbe52cbb7ea (patch)
treedd27b0d0c21f932721b5f3058953f993a9faee43 /functions.sh
parentd4f96c7cdb87e8df7cffdcb33b333c45e3c78d69 (diff)
downloadmageia4arm-f090cffedd995cae04a1ed2823eb9fbe52cbb7ea.tar
mageia4arm-f090cffedd995cae04a1ed2823eb9fbe52cbb7ea.tar.gz
mageia4arm-f090cffedd995cae04a1ed2823eb9fbe52cbb7ea.tar.bz2
mageia4arm-f090cffedd995cae04a1ed2823eb9fbe52cbb7ea.tar.xz
mageia4arm-f090cffedd995cae04a1ed2823eb9fbe52cbb7ea.zip
Move IMAGE= variable outside of configuration, improve clean function, prepare Desktop environment
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh29
1 files changed, 11 insertions, 18 deletions
diff --git a/functions.sh b/functions.sh
index 891803c..e0c33d0 100755
--- a/functions.sh
+++ b/functions.sh
@@ -793,29 +793,19 @@ function clean() {
title "Cleaning"
info "In case script failed or crash inside the chroot, need to unmount dev|sys|proc..."
-# udisksctl unmount -b ${PARTITION}
-# /bin/umount -lf "${BUILD_PATH}/dev"
-# /bin/umount -lf "${BUILD_PATH}/sys"
-# /bin/umount -lf "${BUILD_PATH}/proc"
+ # TODO find what blocks the umount.
unmountdevsysproc
unmountingPartitions
unloopingImage
- # Removing old Build directory
-# if [ -d "${BUILD_PATH}" ]; then
-# info "Removing ${BUILD_PATH}"
-# /usr/bin/rm -Rf "${BUILD_PATH}"
-# else
-# warning "${BUILD_PATH} does not exists"
-# fi
# removing old image
- if [ -e "${INSTALL_PATH}/${IMAGE}" ]; then
- info "Removing ${IMAGE}"
- /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE}"
- else
- warning "${IMAGE} does not exists"
- fi
+ info "Removing ${IMAGE_BASE}* files"
+ /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE_BASE}*.img"
+ /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE_BASE}*.gz"
+ /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE_BASE}*.md5"
+ /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE_BASE}*.sha512"
+ /usr/bin/rm -f "${INSTALL_PATH}/${IMAGE_BASE}*.sha3"
return 0
}
@@ -834,7 +824,10 @@ function check_extrapackage() {
}
function extrapackage() {
- installpkg ${PACKAGE_VALID}
+ if [ "x${DESKTOP_TASK}" != "x" ]; then
+ installpkg ${DESKTOP_TASK}
+ fi
+ installpkg "${PACKAGE_VALID}"
return 0
}