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

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

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

torrents="$1"
target="$2"

cd  $target

btlaunchmanycurses.bittorrent $torrents --max_upload_rate $uploadmax