Skip to content

Instantly share code, notes, and snippets.

@lukas-buergi
Created June 8, 2012 16:07
Show Gist options
  • Save lukas-buergi/2896475 to your computer and use it in GitHub Desktop.
Save lukas-buergi/2896475 to your computer and use it in GitHub Desktop.
Get your HIB torrents
#!/bin/sh
#The following downloads the links to the torrent files and saves a list in "downloadlinks.lst".
wget -i mykeys.txt -O - | grep -roe 'http://torrents.humblebundle.com/.*\.torrent' > downloadlinks.lst
#This checks whether anything is in this list - if nothing is in it something went wrong.
if ! test -s downloadlinks.lst ; then
echo "Doesn't seem to have worked. Probably your keys weren't valid."
fi
#This downloads the torrent files loading the urls of the files from the previously made list.
wget -Ni downloadlinks.lst
#This remove the list of the urls for the torrent files. As you have downloaded the torrent files
#you shouldn't need it anymore. Remove the next line if you want to keep it.
rm downloadlinks.lst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment