sh 在Ubuntu 14.04上进行rTorrent安装/更新

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在Ubuntu 14.04上进行rTorrent安装/更新相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# installs/updates rtorrent from source on Ubuntu

TMPDIR=$(mktemp -d)
mkdir $TMPDIR/logs

install_dependencies () {
	apt-get update
	apt-get install -y git subversion build-essential automake libtool libcppunit-dev zlib1g-dev libcurl4-openssl-dev libncurses5-dev
}

install_xmlrpc-c () {
	cd $TMPDIR
	svn co http://svn.code.sf.net/p/xmlrpc-c/code/advanced xmlrpc-c
	cd xmlrpc-c
	./configure
	make && make install
}

install_librtorrent () {
	cd $TMPDIR
	git clone -b branch-0.13 https://github.com/rakshasa/libtorrent
	cd libtorrent
	./autogen.sh
	./configure
	make && make install
	ldconfig
}

install_rtorrent () {
        cd $TMPDIR
        git clone -b branch-0.9 https://github.com/rakshasa/rtorrent
        cd rtorrent
        ./autogen.sh
        ./configure --with-xmlrpc-c=/usr/local/bin/xmlrpc-c-config
        make && make install
}

echo ""
echo "updating/installing rTorrent"
echo "============================"
echo "Dir: $TMPDIR"
echo ""

echo "Installing dependencies..."
install_dependencies &> $TMPDIR/logs/apt.log
echo ""

echo "Installing xmlrpc-c..."
install_xmlrpc-c &> $TMPDIR/logs/xmlrpc-c.log
echo ""

echo "Installing librtorrent..."
install_librtorrent &> $TMPDIR/logs/librtorrent.log
echo ""

echo "Installing rtorrent..."
install_rtorrent &> $TMPDIR/logs/rtorrent.log
echo ""

echo ""
echo "Logs: $TMPDIR/logs"

以上是关于sh 在Ubuntu 14.04上进行rTorrent安装/更新的主要内容,如果未能解决你的问题,请参考以下文章

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl