Skip to content

Instantly share code, notes, and snippets.

@ChristianGaertner
Last active December 18, 2015 00:58
Show Gist options
  • Save ChristianGaertner/5700358 to your computer and use it in GitHub Desktop.
Save ChristianGaertner/5700358 to your computer and use it in GitHub Desktop.
Git ZIP Cloner
#!/bin/bash
#wget the zip-archive of a github repo
#Syntax:
# git-zip.sh <USER> <REPO>
URL="https://github.com/$1/$2/archive/master.zip"
OUTZIP="$2.zip"
echo "Download started of the repo >>$2<< by >>$1<< from GitHub."
wget"$URL" -O "$OUTZIP" &>/dev/null
if [$? == 0];then
echo "Downloaded and saved to $OUTZIP successfully."
else
echo "Download failed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment