[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

solution: images in diff files ?!



> But now: How do I put the additional Debian-Logo (only 2k) into the 
> diff file ???  Can I rely on the sharutils package though it is only 
> "standard" and not "essential" ?

The best solution I found for putting images or more generally every 
kind ofbinary data into the diff file is making a uuencoded file of it 
and then building a perl script as followed.

This pipes the raw binary data to stdout and you can use it in your
rules file like
   ./uu_debian_logo > $TMP/usr/share/something/logo/debian.png

read you,

   -christian-

---------------------------------------------------------
#!/usr/bin/perl -w

$uu = <<'end';
begin 644 my_uuencoded_data
MG$%U$N%GFH%§$34535GEGHEHz534§53gGH§HJJ
Mfg3pj@4tk343$g$%GH$hHEH%EHeh5HE%%$4444
end

for (split("\n",$logo))  {
    last if /^end/;
    next if /[a-z]/;
    next unless int((((ord() - 32) & 077) + 2) / 3) == int(length()/4);
    print unpack("u", $_);
}
-------------------------------------------------------

-- 
Linux - the choice of the GNU generation.          Join the Debian Project 
                                                     http://www.debian.org 
Christian Hammers * Oberer Heidweg 35 * D-52477 Alsdorf * Tel: 02404-25624
50 3C 52 26 3E 52 E7 20  D2 A1 F5 16 C4 C9 D4 D3  1024/925BCB55 1997/11/01


Reply to: