Skip to content

Instantly share code, notes, and snippets.

@tracyhatemice
Created February 7, 2017 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracyhatemice/ec1124d058368e2d22498ea5931b618a to your computer and use it in GitHub Desktop.
Save tracyhatemice/ec1124d058368e2d22498ea5931b618a to your computer and use it in GitHub Desktop.
rTorrent install/update on Ubuntu 14.04
#!/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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment