# HG changeset patch # User Christopher Rogers # Date 1302785063 0 # Node ID 3f067695da693f3b54d1897ad264ec9e088698f4 # Parent c9faa685ba1378d23d76d9dc6e2a01b5d330583e Fixed slitaz-modular script to work better with a unclean working folder. diff -r c9faa685ba13 -r 3f067695da69 initramfs/usr/bin/slitaz-modular --- a/initramfs/usr/bin/slitaz-modular Wed Apr 13 14:10:18 2011 +0000 +++ b/initramfs/usr/bin/slitaz-modular Thu Apr 14 12:44:23 2011 +0000 @@ -119,7 +119,9 @@ cat "$BASEDIR/initramfs/initramfs.list" | grep -v "^#" | while read pkgname; do if [ ! -f ${INITRAMFS}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then tazpkg get-install $pkgname --root=$INITRAMFS | tee -a $LOG/initramfs.log - echo "$pkgname" >> $ISODIR/packages-order.txt + if [ ! $(grep -l "^${pkgname}$" $ISODIR/packages-order.txt) ]; then + echo "$pkgname" >> $ISODIR/packages-order.txt + fi sleep 1 else info "${pkgname} installed" @@ -331,7 +333,7 @@ # packages that don't exist in repo or wok cat $ISODIR/packages-order.txt | while read pkg; do if [ ! -f $WOK/$pkg/receipt ]; then - sed -i "s|$pkg||g" $ISODIR/packages-order.txt + sed -i "s|^${pkg}$||g" $ISODIR/packages-order.txt fi done tazwok gen-cooklist $ISODIR/packages-order.txt > $ISODIR/cookorder.list @@ -483,7 +485,8 @@ info "Copying isolinux files..." if [ -d $INITRAMFS/boot/isolinux ]; then - mv -f $INITRAMFS/boot/isolinux $ISODIR/boot + cp -a $INITRAMFS/boot/isolinux $ISODIR/boot + rm -rf $INITRAMFS/boot/isolinux fi if [ -d ${PROFILE}/overlay ]; then