#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/audio/last.fm/files/pkg-install.in,v 1.1 2007-02-06 14:20:53 lofi Exp $
#

if [ "$2" != "POST-INSTALL" ]; then
        exit 0
fi

lmozprefs=/usr/local/lib/linux-firefox/defaults/pref/firefox.js
blmozprefs=/usr/local/lib/linux-firefox/defaults/pref/firefox.js.bak

mozprefs=/usr/local/lib/firefox/defaults/pref/firefox.js
bmozprefs=/usr/local/lib/firefox/defaults/pref/firefox.js.bak

if [ -f $lmozprefs ]; then
        cp $lmozprefs $blmozprefs
        echo 'pref("network.protocol-handler.app.lastfm", "/usr/local/bin/last.fm");' >> $lmozprefs
fi

if [ -f $mozprefs ]; then
	cp $mozprefs $bmozprefs
	echo 'pref("network.protocol-handler.app.lastfm", "/usr/local/bin/last.fm");' >> $mozprefs
fi



exit 0
