Browse Source

updated vbuilder.sh.in: improved Clean()

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@2770 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
6c7ca0d666
1 changed files with 3 additions and 3 deletions
  1. 3 3
      vbuilder.sh.in

+ 3 - 3
vbuilder.sh.in

@@ -548,20 +548,20 @@ Clean(){
     mount-chroot --umount /proc
     mount-chroot --umount /proc
     apt-get-update --host
     apt-get-update --host
 
 
-    ## We remark that we first remove /lib*, and secondly remove /. 
+    ## We remark that we first remove /, and secondly remove /. 
     ## If we directly remove /, we obtained some non-empty directories: 
     ## If we directly remove /, we obtained some non-empty directories: 
     ##   /dev/.udev/rules.d. 
     ##   /dev/.udev/rules.d. 
     if [ $with_unionfs -eq 1 ]; then
     if [ $with_unionfs -eq 1 ]; then
 	if [ -d ${UNIONFS_ROOT} ]; then
 	if [ -d ${UNIONFS_ROOT} ]; then
 	    echo -n $"Cleaning build root ${UNIONFS_ROOT} via unionfs ... "
 	    echo -n $"Cleaning build root ${UNIONFS_ROOT} via unionfs ... "
-	    rm -rf ${UNIONFS_ROOT}/lib*
+	    rm -rf ${UNIONFS_ROOT} 2>/dev/null
 	    rm -rf ${UNIONFS_ROOT}
 	    rm -rf ${UNIONFS_ROOT}
 	    echo $"done."
 	    echo $"done."
 	fi
 	fi
     else
     else
 	if [ -d ${BUILD_ROOT} ]; then
 	if [ -d ${BUILD_ROOT} ]; then
 	    echo -n $"Cleaning build root ${BUILD_ROOT} ... "
 	    echo -n $"Cleaning build root ${BUILD_ROOT} ... "
-	    rm -rf ${UNIONFS_ROOT}/lib*
+	    rm -rf ${BUILD_ROOT} 2>/dev/null
 	    rm -rf ${BUILD_ROOT}
 	    rm -rf ${BUILD_ROOT}
 	    echo $"done."
 	    echo $"done."
 	fi
 	fi