Fun/bored with Torrents

#!/bin/bash
# AUTHOR -
# M@ - M@sprackle.org GPG Public Key ID:  0x4ADEA413
# NAME -
# fc11Downers
# SYNOPSIS -
# `*/20  * * * /PATH/TO/fc11Downers
# DESCRIPTION -
# Just a bittorrent downloader that would pull the Fedora Core 11 DVD when it dropped.
# I was kinda bored and a co-worker and I joked about this so I thought it would be fun.
# I think this would be interesting in a loop if you had a linux distro that updated weekly
# and you wanted to get all the new versions off bittorrent each week.
# I think version two will read in a file and loop it.  For weekly linux distros only though,
# those are legal on bittorrent.
# REVISIONS -
# 1.0

URLTOLOOK="http://torrent.fedoraproject.org"
WHATTOPULL="Fedora-11-x86_64-DVD.torrent"
# Check to see if the DVD has posted yet.
links -source ${URLTOLOOK} > /tmp/site
egrep ${WHATTOPULL} /tmp/site
	if [ $? == "0" ]; then
		if [ -f /tmp/${WHATTOPULL}.lock ];then
			exit
		fi
		egrep ${WHATTOPULL} /tmp/complete
		 if [ $? != "0" ]; then
		 exit
		 fi
	touch /tmp/${WHATTOPULL}.lock
bittorrent-console --save_in ~/Download --forwarded_port 7325 $(egrep ${WHATTOPULL} \
/tmp/site | awk -F"href=" '{print $2}' | awk -F\" '{print $2}')
	fi
rm /tmp/${WHATTOPULL}.lock
echo ${WHATTOPULL} > /tmp/complete
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]