Skip to content

Instantly share code, notes, and snippets.

@alexdantas
Created June 3, 2013 18:31
Show Gist options
  • Save alexdantas/5700233 to your computer and use it in GitHub Desktop.
Save alexdantas/5700233 to your computer and use it in GitHub Desktop.
Gets the archived zipball of a GitHub repository
#!/bin/bash
# Gets the archived zipball of a GitHub repository
# $1 user
# $2 repo
LINK="https://github.com/$1/$2/archive/master.zip"
ZIPFILE="$2.zip"
echo "Downloading project '$2' from GitHub user '$1'..."
wget "$LINK" -O "$ZIPFILE" &>/dev/null
if [ $? == 0 ]; then
echo "Download successful on '$ZIPFILE'!"
else
echo "Download failed!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment