diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-05-26 18:57:40 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-06-03 17:18:24 +0200 |
commit | 220d69b2ce18fab70b874a848ee646fe02eaa0aa (patch) | |
tree | dcf4cec8dcce74bd223a65b8338515e07c50f190 /tools | |
parent | aa27430e10b10aa1ff879722095696c66bed85ae (diff) | |
download | zsh-220d69b2ce18fab70b874a848ee646fe02eaa0aa.tar.gz zsh-220d69b2ce18fab70b874a848ee646fe02eaa0aa.tar.bz2 zsh-220d69b2ce18fab70b874a848ee646fe02eaa0aa.zip |
installer: allow configuration of remote URL to clone from
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/install.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/install.sh b/tools/install.sh index 0d5ad2633..db23d9896 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -11,16 +11,17 @@ # # Respects these environment variables for tweaking the installation process: # REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh) -# BRANCH - branch to check out immediately after install +# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS) +# BRANCH - branch to check out immediately after install (default: master) # set -e # Default settings ZSH=${ZSH:-~/.oh-my-zsh} REPO=${REPO:-robbyrussell/oh-my-zsh} +REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master} - command_exists() { command -v "$@" >/dev/null 2>&1 } @@ -76,7 +77,7 @@ setup_ohmyzsh() { exit 1 fi - git clone --depth=1 --branch "$BRANCH" "https://github.com/$REPO.git" "$ZSH" || { + git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || { error "git clone of oh-my-zsh repo failed" exit 1 } |