Skip to content

Instantly share code, notes, and snippets.

@drewyeaton
Created April 14, 2009 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewyeaton/94904 to your computer and use it in GitHub Desktop.
Save drewyeaton/94904 to your computer and use it in GitHub Desktop.
#!/bin/bash
USERNAME=yourusername
PASSWORD=password
REPOSITORY=something
echo "Downloading..."
wget --post-data "login=$USERNAME&password=$PASSWORD" --cookies=on --save-cookies=cookies.txt --keep-session-cookies --no-check-certificate https://github.com/session
wget --cookies=on --load-cookies=cookies.txt --keep-session-cookies --save-cookies=cookies.txt --no-check-certificate https://github.com/$USERNAME/$REPOSITORY/tarball/master
rm *.html
rm *.txt
rm index.*
echo "Unarchiving..."
tar -xzf $USERNAME-$REPOSITORY*.tar.gz
cp -rf $USERNAME-$REPOSITORY*/output/* ./
echo "Cleanng up..."
rm -r $USERNAME-$REPOSITORY*
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment