From 13c362cd9be1accbfa52a5b5359122a8fdb4ce08 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 18 Jun 2020 00:24:29 -0500 Subject: [PATCH] Update: package.sh clean should operate like build The clean operation should respect the mode parameters in the same way build does. --- build/scripts/package.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/build/scripts/package.sh b/build/scripts/package.sh index b07c332..228ad3b 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -904,11 +904,29 @@ package_dependencies_monolithic() { package_operation_clean() { local i= - for i in ${path_destination}{individual,level,monolithic,program} ; do - if [[ -d $i ]] ; then - rm $verbose -Rf $i + if [[ $mode_individual == "yes" ]] ; then + if [[ -d ${path_destination}individual ]] ; then + rm $verbose -Rf ${path_destination}individual fi - done + fi + + if [[ $mode_level == "yes" ]] ; then + if [[ -d ${path_destination}level ]] ; then + rm $verbose -Rf ${path_destination}level + fi + fi + + if [[ $mode_monolithic == "yes" ]] ; then + if [[ -d ${path_destination}monolithic ]] ; then + rm $verbose -Rf ${path_destination}monolithic + fi + fi + + if [[ $mode_program == "yes" ]] ; then + if [[ -d ${path_destination}program ]] ; then + rm $verbose -Rf ${path_destination}program + fi + fi } package_operation_copy_package() { -- 1.8.3.1