]> Kevux Git Server - fll/commitdiff
Update: package.sh clean should operate like build
authorKevin Day <thekevinday@gmail.com>
Thu, 18 Jun 2020 05:24:29 +0000 (00:24 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 18 Jun 2020 05:25:22 +0000 (00:25 -0500)
The clean operation should respect the mode parameters in the same way build does.

build/scripts/package.sh

index b07c332f8fde4015c4d868656b2f3e23426ae555..228ad3b2143913ec9e0477455e28af2f22b94e1e 100644 (file)
@@ -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() {