Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 37 lines (26 sloc) 0.888 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#!/bin/bash

if [ "X$1" == "X" ]; then
echo "you must provide a target installation directory"
    exit 1
fi

export LANTORRENT_HOME=$1

pylib=`python -c 'import sys; print sys.prefix'`

echo "Installing into the python libraries into $pylibs..."
echo "Installing wrapper scripts into $LANTORRENT_HOME"

mkdir -p $LANTORRENT_HOME/bin
mkdir -p $LANTORRENT_HOME/etc
dir=`dirname $0`
cd $dir

python setup.py install
if [ $? -ne 0 ]; then
exit 1
fi

ltrequest="$pylib/bin/ltrequest"
ltdaemon="$pylib/bin/ltdaemon"

sed "s^@PGMNAME@^$ltrequest^" etc/exe.in > $LANTORRENT_HOME/bin/lt-request.sh
sed "s^@PGMNAME@^$ltdaemon^" etc/exe.in > $LANTORRENT_HOME/bin/lt-daemon.sh

chmod 755 $LANTORRENT_HOME/bin/lt-request.sh
chmod 755 $LANTORRENT_HOME/bin/lt-daemon.sh

cp -r tests $LANTORRENT_HOME
cp etc/xinetd.conf.in $LANTORRENT_HOME/tests
cp etc/lantorrent.inet.in $LANTORRENT_HOME/tests
Something went wrong with that request. Please try again.