slitaz-modular rev 82

Fixed mkiso.sh to remove log files if then exist. This is so the new logs are not added to the older ones.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Apr 27 05:29:02 2011 +0000 (2011-04-27)
parents abd5347e7e5a
children f250a6f36312
files mkiso.sh
line diff
     1.1 --- a/mkiso.sh	Wed Apr 20 03:23:32 2011 +0000
     1.2 +++ b/mkiso.sh	Wed Apr 27 05:29:02 2011 +0000
     1.3 @@ -142,6 +142,7 @@
     1.4  	fi
     1.5  
     1.6  	info "Making bootable image"
     1.7 +	[ -f $LOG/initramfs.log ] && rm -f $LOG/initramfs.log
     1.8  	cat "$BASEDIR/initramfs/initramfs.list" | grep -v "^#" | while read pkgname; do
     1.9  		if [ ! -f ${INITRAMFS}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
    1.10  			tazpkg get-install $pkgname --root=$INITRAMFS | tee -a $LOG/initramfs.log
    1.11 @@ -214,6 +215,7 @@
    1.12  		echo "${mod} module exist. Moving on."
    1.13  	elif [ ! -d ${MODULES_DIR}/${mod}/var/lib/tazpkg/installed ]; then
    1.14  		if [ -f "$PROFILE/list/${mod}.list" ]; then
    1.15 +			[ -f ${LOG}/${mod}-current.log ] && rm -f ${LOG}/${mod}-current.log
    1.16  			cat "$PROFILE/list/${mod}.list" | grep -v "^#" | while read pkgname; do
    1.17  				if [ ! -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
    1.18  					tazpkg get-install $pkgname --root=${UNION} | tee -a ${LOG}/${mod}-current.log
    1.19 @@ -225,9 +227,10 @@
    1.20  		fi
    1.21  
    1.22  		if [ -f $PROFILE/list/${mod}.removelist ]; then
    1.23 +			[ -f ${LOG}/${mod}-current-removelist.log ] && rm -f ${LOG}/${mod}-current-removelist.log
    1.24  			cat "$PROFILE/list/${mod}.removelist" | grep -v "^#" | while read pkgname; do
    1.25  				if [ -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
    1.26 -					echo "y" | tazpkg remove ${pkgname} --root=${UNION} | tee -a ${LOG}/${mod}-current.log
    1.27 +					echo "y" | tazpkg remove ${pkgname} --root=${UNION} | tee -a ${LOG}/${mod}-current-removelist.log
    1.28  					sleep 1
    1.29  				else
    1.30  					info "${pkgname} removed"
    1.31 @@ -359,7 +362,8 @@
    1.32  			done
    1.33  		done
    1.34  		
    1.35 -		[ -d $PKGISO_DIR ] && tazwok gen-list $PKGISO_DIR
    1.36 +		[ -f $LOG/packages-gen-list.log ] && rm -f $LOG/packages-gen-list.log
    1.37 +		[ -d $PKGISO_DIR ] && tazwok gen-list $PKGISO_DIR | tee -a $LOG/packages-gen-list.log
    1.38  	fi
    1.39  	
    1.40  }