Last active
December 29, 2015 02:48
-
-
Save EspressoCake/57f2945e23a00770fd01 to your computer and use it in GitHub Desktop.
CCC_File_Grabber
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This will grab all of the existing torrent files for the C32C3 stream | |
#From https://streaming.media.ccc.de/32c3/ | |
#It will ignore all files that you already have | |
#Enjoy! | |
echo "Creating a filelist for you..." | |
touch ~/filelist | |
if [ ! -d ~/CCC_Torrents ]; then | |
echo "Creating the necessary directory..." | |
mkdir ~/CCC_Torrents | |
fi | |
curl -sL http://cdn.media.ccc.de/INDEX.gz | zgrep congress/2015 | sed 's|.* \./|http://cdn.media.ccc.de/|;s|$|.torrent|' >> ~/filelist | |
cd ~/CCC_Torrents | |
cat ../filelist | while read line; do | |
if [ ! -f $PWD/$(echo $line | cut -d'/' -f7-) ]; then | |
wget -nv $line | |
fi | |
done | |
echo "Cleaning up..." | |
rm -f ../filelist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment