summaryrefslogtreecommitdiffstats
path: root/extra/source/bittornado/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/bittornado/doinst.sh')
-rw-r--r--extra/source/bittornado/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/extra/source/bittornado/doinst.sh b/extra/source/bittornado/doinst.sh
new file mode 100644
index 000000000..51164b367
--- /dev/null
+++ b/extra/source/bittornado/doinst.sh
@@ -0,0 +1,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