Guest User

Untitled

a guest
Nov 17th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. set -e
  4.  
  5. URI=$1
  6. REPO=$(basename $1)
  7. REPO="${REPO%.*}"
  8. GITHUB_USERNAME=$(basename $(dirname $1))
  9. GITHUB_USERNAME=${GITHUB_USERNAME##*:}
  10.  
  11. # e.g
  12. # github-clone git@github.com:rubygems/rubygems.org.git
  13. # Will clone the repository to rubygems/rubygems.
  14. git clone $URI $GITHUB_USERNAME/$REPO
Add Comment
Please, Sign In to add comment