slitaz-modular rev 71

Fixed slitaz-modular script to work better with a unclean working folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Apr 14 12:44:23 2011 +0000 (2011-04-14)
parents c9faa685ba13
children fe7948a8e277
files initramfs/usr/bin/slitaz-modular
line diff
     1.1 --- a/initramfs/usr/bin/slitaz-modular	Wed Apr 13 14:10:18 2011 +0000
     1.2 +++ b/initramfs/usr/bin/slitaz-modular	Thu Apr 14 12:44:23 2011 +0000
     1.3 @@ -119,7 +119,9 @@
     1.4  	cat "$BASEDIR/initramfs/initramfs.list" | grep -v "^#" | while read pkgname; do
     1.5  		if [ ! -f ${INITRAMFS}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
     1.6  			tazpkg get-install $pkgname --root=$INITRAMFS | tee -a $LOG/initramfs.log
     1.7 -			echo "$pkgname" >> $ISODIR/packages-order.txt
     1.8 +			if [ ! $(grep -l "^${pkgname}$" $ISODIR/packages-order.txt) ]; then
     1.9 +				echo "$pkgname" >> $ISODIR/packages-order.txt
    1.10 +			fi
    1.11  			sleep 1
    1.12  		else
    1.13  			info "${pkgname} installed"
    1.14 @@ -331,7 +333,7 @@
    1.15  		# packages that don't exist in repo or wok
    1.16  		cat $ISODIR/packages-order.txt | while read pkg; do
    1.17  			if [ ! -f $WOK/$pkg/receipt ]; then
    1.18 -				sed -i "s|$pkg||g" $ISODIR/packages-order.txt
    1.19 +				sed -i "s|^${pkg}$||g" $ISODIR/packages-order.txt
    1.20  			fi
    1.21  		done
    1.22  		tazwok gen-cooklist $ISODIR/packages-order.txt > $ISODIR/cookorder.list
    1.23 @@ -483,7 +485,8 @@
    1.24  
    1.25  	info "Copying isolinux files..."
    1.26  	if [ -d $INITRAMFS/boot/isolinux ]; then
    1.27 -		mv -f $INITRAMFS/boot/isolinux $ISODIR/boot
    1.28 +		cp -a $INITRAMFS/boot/isolinux $ISODIR/boot
    1.29 +		rm -rf $INITRAMFS/boot/isolinux
    1.30  	fi
    1.31  
    1.32  	if [ -d ${PROFILE}/overlay ]; then