Created
March 22, 2017 11:27
-
-
Save network23/c95fb2bfaf904b7889720d090eba1069 to your computer and use it in GitHub Desktop.
This script will clone a github repository and register it with myrepos.
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 script will clone a github repository and register it with myrepos. | |
# | |
# How to use: | |
# You need myrepo's and git. If you are using Debian/Ubuntu/Mint: sudo apt install -y myrepos git | |
# chmod +x mrgitclone.sh | |
# An alias is recommended, if you are using bash and the script is in your home dir: echo "alias mrgitclone='~/mrgitclone.sh'" >> ~/.bash_aliases | |
# ./mrgitclone.sh https://github.com/name/project.git | |
# | |
# To update all your github repositories: mr update | |
# | |
url=$1 | |
if [ "$url" = "" ]; then | |
echo "check die url swa" | |
exit | |
fi | |
git clone $url | |
prognaam=$(basename --suffix=.git $url) | |
mr reg $prognaam |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment