# HG changeset patch # User Christopher Rogers # Date 1303882142 0 # Node ID b56c0ab05e6e344ae0780ce0288876984910892c # Parent abd5347e7e5a074a8dbec336f64ec9cec7509757 Fixed mkiso.sh to remove log files if then exist. This is so the new logs are not added to the older ones. diff -r abd5347e7e5a -r b56c0ab05e6e mkiso.sh --- a/mkiso.sh Wed Apr 20 03:23:32 2011 +0000 +++ b/mkiso.sh Wed Apr 27 05:29:02 2011 +0000 @@ -142,6 +142,7 @@ fi info "Making bootable image" + [ -f $LOG/initramfs.log ] && rm -f $LOG/initramfs.log 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 @@ -214,6 +215,7 @@ echo "${mod} module exist. Moving on." elif [ ! -d ${MODULES_DIR}/${mod}/var/lib/tazpkg/installed ]; then if [ -f "$PROFILE/list/${mod}.list" ]; then + [ -f ${LOG}/${mod}-current.log ] && rm -f ${LOG}/${mod}-current.log cat "$PROFILE/list/${mod}.list" | grep -v "^#" | while read pkgname; do if [ ! -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then tazpkg get-install $pkgname --root=${UNION} | tee -a ${LOG}/${mod}-current.log @@ -225,9 +227,10 @@ fi if [ -f $PROFILE/list/${mod}.removelist ]; then + [ -f ${LOG}/${mod}-current-removelist.log ] && rm -f ${LOG}/${mod}-current-removelist.log cat "$PROFILE/list/${mod}.removelist" | grep -v "^#" | while read pkgname; do if [ -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then - echo "y" | tazpkg remove ${pkgname} --root=${UNION} | tee -a ${LOG}/${mod}-current.log + echo "y" | tazpkg remove ${pkgname} --root=${UNION} | tee -a ${LOG}/${mod}-current-removelist.log sleep 1 else info "${pkgname} removed" @@ -359,7 +362,8 @@ done done - [ -d $PKGISO_DIR ] && tazwok gen-list $PKGISO_DIR + [ -f $LOG/packages-gen-list.log ] && rm -f $LOG/packages-gen-list.log + [ -d $PKGISO_DIR ] && tazwok gen-list $PKGISO_DIR | tee -a $LOG/packages-gen-list.log fi }