aboutsummaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
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
}