Bas Wijnen wrote:
> Package: live-helper
> Version: 1.0~a38-1
> Tags: patch
> 
> When including files in the binary image which have strange characters
> in them (I think even spaces, but certainly quotes), lh_binary_md5sum
> chokes due to xargs parsing those characters.  The problematic line is
> 
>       find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
>       -v 'boot/grub/stage2_eltorito' | xargs -I{} md5sum "{}" >
>       ../md5sum.txt
> 
> The error message (when having files with quotes) suggests using the -0
> option.  This is a good idea, but needs '\0'-separated fields.  So the
> line becomes:
> 
>       find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep
>       -v 'boot/grub/stage2_eltorito' | while read file ; do echo -en
>       "$file\0" ; done | xargs -0 -I{} md5sum "{}" > ../md5sum.txt
I would suggest:

find . -type f \! -name 'isolinux/isolinux.bin' \! -name
'boot/grub/stage2_eltorito' -print0 | xargs -0 md5sum > ../md5sum.txt
> 
> I'm not entirely sure if there're bashisms in there, but I don't think
> so.  I tested this (with bash) and it can indeed handle files with
> spaces and quotes in their names.
The option -e of echo is not part of the POSIX standard, but provided by bash's
echo, ksh's echo and /bin/echo.

> 
> Thanks,
> Bas
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> debian-live-devel mailing list
> [email protected]
> http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


-- 
Julian Andres Klode, Fellow of the Free Software Foundation Europe
                     Debian Maintainer | Developer | Ubuntu Member

try Debian: http://www.debian.org/ | my site: http://jak-linux.org/
        jabber: [EMAIL PROTECTED] | IRC: juliank (FreeNode, OFTC)
            languages:     German  | English

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to