* [gentoo-dev] mimetype question
@ 2002-06-02 13:22 Per Wigren
2002-06-02 20:50 ` Martin Schlemmer
0 siblings, 1 reply; 2+ messages in thread
From: Per Wigren @ 2002-06-02 13:22 UTC (permalink / raw
To: gentoo-dev
I'm making an ebuild for BitTorrent which is a P2P "download-helper".. If
clicking a link in a browser that has "content-type:
application/x-bittorrent", the download will be handled by BitTorrent
instead, and the download will be distributed among everyone who is
downloading the same file at the time, so it doesn't load the server...
The problem is that I have to make the ebuild add a line to /etc/mailcap.. Is
there a standard way to do this?
// Wigren
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] mimetype question
2002-06-02 13:22 [gentoo-dev] mimetype question Per Wigren
@ 2002-06-02 20:50 ` Martin Schlemmer
0 siblings, 0 replies; 2+ messages in thread
From: Martin Schlemmer @ 2002-06-02 20:50 UTC (permalink / raw
To: Gentoo-Dev
On Sun, 2002-06-02 at 15:22, Per Wigren wrote:
> I'm making an ebuild for BitTorrent which is a P2P "download-helper".. If
> clicking a link in a browser that has "content-type:
> application/x-bittorrent", the download will be handled by BitTorrent
> instead, and the download will be distributed among everyone who is
> downloading the same file at the time, so it doesn't load the server...
>
> The problem is that I have to make the ebuild add a line to /etc/mailcap.. Is
> there a standard way to do this?
>
Havent really done this, but try something like:
src_install() {
# if the user have a mailcap, and it do not
# have the entry added, put his copy into ${D}/etc
if [ -f ${ROOT}/etc/mailcap ]
then
insinto /etc
# install the users real mailcap into ${D}
doins ${ROOT}/etc/mailcap
else
touch ${D}/etc/mailcap
fi
# now add the entry if not already there
if [ -z "$(grep x-bittorrent ${D}/etc/mailcap)" ]
then
# add the needed line
echo "application/x-bittorrent...." >> \
${D}/etc/mailcap
fi
}
Greetings,
--
Martin Schlemmer
Gentoo Linux Developer, Desktop Team Developer
Cape Town, South Africa
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-02 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-02 13:22 [gentoo-dev] mimetype question Per Wigren
2002-06-02 20:50 ` Martin Schlemmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox