summaryrefslogtreecommitdiff
path: root/extra/source/bittornado/doinst.sh
blob: 51164b367f845da53ed736b85592a82fb1591406 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Add bittorrent support to /etc/mailcap unless it's found there
# already (commented out, or not):
if ! grep application/x-bittorrent etc/mailcap 1> /dev/null 2> /dev/null ; then
  echo "application/x-bittorrent; /usr/bin/btdownloadxterm.sh '%s' ; " >> etc/mailcap
fi


# Add bittornado support to /etc/mailcap unless it's found there
# already (commented out, or not):
if ! grep application/x-bittorrent etc/mailcap 1> /dev/null 2> /dev/null ; then
  echo "application/x-bittorrent; /usr/bin/btdownloadxterm.sh '%s' ; " >> etc/mailcap
else
  # If it calls bittorrent-xterm, make btdownloadxterm.sh the default instead:
  if grep bittorrent-xterm etc/mailcap 1> /dev/null 2> /dev/null ; then
    sed -i -e 's/bittorrent-xterm/btdownloadxterm.sh/g' etc/mailcap
  fi
fi