#!/bin/sh # 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 # If it calls bittorrent-xterm.sh, make btdownloadxterm.sh the default instead: elif grep bittorrent-xterm.sh etc/mailcap 1> /dev/null 2> /dev/null ; then sed -i 's/bittorrent-xterm.sh/btdownloadxterm.sh/g' etc/mailcap fi