. $config
askyes "create-iso" "Create the KnoppixReloaded iso"

if [ $zisofs == 1 ]; then
 mv $newtree $newtree.uncompressed
 mkzftree -v -z1 -p$CPUS $newtree.uncompressed $newtree
 # kernel and boot stuff should not be compressed
 cp -a $newtree.uncompressed/isolinux $newtree/isolinux
fi

if [ $isolinux == 1 ]; then
 cd $newtree
 rm -rf .rr_moved || true
 mkisofs -L -R -l -V "KNOPPIX with local stuff" -hide-rr-moved -v -allow-multidot \
         -b isolinux/isolinux.bin -c isolinux/boot.cat \
         -no-emul-boot -boot-load-size 4 -boot-info-table -o $newiso $newtree
else
 mkisofs -L -R -l -V "KNOPPIX ISO9660" -v -allow-multidot $newtree | create_compressed_fs - 65536 > $newisodir/KNOPPIX/KNOPPIX
 cd $newisodir
 mkisofs    -r -l -V "KNOPPIX with local stuff" -hide-rr-moved -v \
         -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -o $newiso $newisodir
fi

