slitaz-modular rev 61
Fixed slitaz-modular script to only remove packages-order.txt if CLEAN_MODULES_DIR equals yes. Also made sure to add old code in mkiso.sh script into slitaz-modular script to remove modules folders if CLEAN_MODULES_DIR equals yes.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Apr 11 13:23:13 2011 +0000 (2011-04-11) |
parents | 3baad9f857a2 |
children | b4cd8833c2dd |
files | initramfs/usr/bin/slitaz-modular |
line diff
1.1 --- a/initramfs/usr/bin/slitaz-modular Mon Apr 11 12:32:30 2011 +0000 1.2 +++ b/initramfs/usr/bin/slitaz-modular Mon Apr 11 13:23:13 2011 +0000 1.3 @@ -254,8 +254,10 @@ 1.4 1.5 touch $SGNFILE 1.6 1.7 - [ -f $ISODIR/packages-order.txt ] && rm -f $ISODIR/packages-order.txt 1.8 - touch $ISODIR/packages-order.txt 1.9 + if [ "$CLEAN_MODULES_DIR" = "yes" ]; then 1.10 + [ -f $ISODIR/packages-order.txt ] && rm -f $ISODIR/packages-order.txt 1.11 + touch $ISODIR/packages-order.txt 1.12 + fi 1.13 1.14 if [ "$CLEAN_INITRAMFS" = "yes" ]; then 1.15 if [ -d ${INITRAMFS} ]; then 1.16 @@ -281,6 +283,11 @@ 1.17 if [ ! $(grep "^$d$" $ISODIR/packages-order.txt) ]; then 1.18 [ -d $MODULES_DIR/$d ] || mkdir -p $MODULES_DIR/$d 1.19 [ -f $MODULES_DIR/$d/receipt ] && continue 1.20 + if [ "$CLEAN_MODULES_DIR" = "yes" ]; then 1.21 + if [ -d $MODULES_DIR/$d ]; then 1.22 + rm -Rf $MODULES_DIR/$d 1.23 + fi 1.24 + fi 1.25 info "Make module of depend package $i" 1.26 echo "$d" >> $ISODIR/packages-order.txt 1.27 cd $MODULES_DIR/$d 1.28 @@ -292,6 +299,11 @@ 1.29 if [ ! $(grep "^$i$" $ISODIR/packages-order.txt) ]; then 1.30 [ -d $MODULES_DIR/$i ] || mkdir -p $MODULES_DIR/$i 1.31 [ -f $MODULES_DIR/$i/receipt ] && continue 1.32 + if [ "$CLEAN_MODULES_DIR" = "yes" ]; then 1.33 + if [ -d $MODULES_DIR/$i ]; then 1.34 + rm -Rf $MODULES_DIR/$i 1.35 + fi 1.36 + fi 1.37 echo "$i" >> $ISODIR/packages-order.txt 1.38 info "Make module of main package $i" 1.39 cd $MODULES_DIR/$i