Created
June 3, 2013 18:31
-
-
Save alexdantas/5700233 to your computer and use it in GitHub Desktop.
Gets the archived zipball of a GitHub repository
This file contains 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 | |
# 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