Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NONGIT_OK=true
- source "$(git --exec-path)/git-sh-setup"
- USAGE="REPO"
- function _get() {
- if [[ $# == 1 ]]; then
- code_home="${GIT_CODE_HOME:-$HOME}"
- repo_path=$(echo "$1" | sed -e 's/^git@\(.*\):\(.*\).git$/\1\/\2/')
- git clone $1 $code_home/$repo_path
- else
- usage
- fi
- }
- _get $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement