#!/bin/bash
# btcurses, another part of the flua bittorrent wrapper 
# for DSL, by J.P. Nimmo, aka SaidinUnleashed

if [ "x$2" = "x" ]; then
  echo "usage: btcurses <url to .torrent> <folder to save file(s)> <max upload in Kb/s>"
  exit
fi

if [ "x$3" != "x" ]; then
  uploadmax="$3"
else
  uploadmax="0"
fi

torrent="$1"
target="$2"

cd  $target

btdownloadcurses.bittorrent --max_upload_rate $uploadmax --url $torrent