Last active
July 12, 2021 14:07
-
-
Save sitemapxml/ccb1b14e4fbee4cc8122c086ec5694e6 to your computer and use it in GitHub Desktop.
This simple script allows you to clone git repository by entering github username and repository name.
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 | |
# ############################################################################################################################################# | |
# This simple script will allow you to clone github project by providing github username and repository name you want to clone. | |
# The format is as following: | |
# > github username repository foldername | |
# Foldername is not neccessary. If not specified, repository name will be used. | |
# This script is meant to be copied to /usr/bin so you can run it as a command. | |
# You can do so by running: | |
# > wget https://gist.githubusercontent.com/sitemapxml/ccb1b14e4fbee4cc8122c086ec5694e6/raw/6d4b9bb97b455a79ed7a54b48734d15ec1a39fb4/github.sh | |
# > chmod +x github.sh | |
# > mv github.sh /usr/bin/github | |
# After that you can run it normally as any other command. | |
# ############################################################################################################################################# | |
if [ $# = 0 ]; then | |
echo "Please provide necessary arguments divided by space:" | |
echo "github username | repository name | download folder name (optional)" | |
else | |
git clone https://github.com/$1/$2.git $3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment