-# Update all the directories provided as argument in their respective
-# versionning systems (SVN and GIT for now)
-
-function vcup () {
- if [[ "$1" ]]; then
- while [[ "$1" ]]; do
- pushd > /dev/null "$1"
- if [[ -d ".git" ]]; then
- echo "${PWD} is under GIT"
- git pull
- elif [[ -d ".svn" ]]; then
- echo "${PWD} is under SVN"
- svn update
- else
- echo "No known versioning system here."
- fi
- popd > /dev/null
- shift
- done
- cd ${CURRENT}
- else
- vcup .
- fi
-}
-
-######################################################################
-# Downloads torrents located in ${BT_DIR}/torrents/ and puts the
-# result in the ${BT_DIR}
-
-function bt () {
- if [[ ${BT_DIR} ]]; then
- if [[ -d "${BT_DIR}/torrents" ]]; then
- if [[ "$1" ]]; then
- mv "$1" ${BT_DIR}/torrents
- fi
- if [[ "$(ps auxwww | grep btlaunchmanycurses | grep -v grep)" ]]; then
- echo "A client is already running."
- else
- cd ${BT_DIR} && screen btlaunchmanycurses torrents --max_upload_rate 32
- fi
- else
- echo "Directory ${BT_DIR}/torrents does not exist."
- fi
- else
- echo "You have to set \$BT_DIR."
- fi
-}