220d69b2ce18fab70b874a848ee646fe02eaa0aa
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
installer: allow configuration of remote URL to clone from
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 0d5ad263370a72bb5bf19d0a3f8aeec81e0636db..db23d9896997fe92e789ca7267b372a2cd41d34e 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -11,16 +11,17 @@
6 #
7 # Respects these environment variables for tweaking the installation process:
8 # REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh)
9-# BRANCH - branch to check out immediately after install
10+# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS)
11+# BRANCH - branch to check out immediately after install (default: master)
12 #
13 set -e
14
15 # Default settings
16 ZSH=${ZSH:-~/.oh-my-zsh}
17 REPO=${REPO:-robbyrussell/oh-my-zsh}
18+REMOTE=${REMOTE:-https://github.com/${REPO}.git}
19 BRANCH=${BRANCH:-master}
20
21-
22 command_exists() {
23 command -v "$@" >/dev/null 2>&1
24 }
25@@ -76,7 +77,7 @@ setup_ohmyzsh() {
26 exit 1
27 fi
28
29- git clone --depth=1 --branch "$BRANCH" "https://github.com/$REPO.git" "$ZSH" || {
30+ git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || {
31 error "git clone of oh-my-zsh repo failed"
32 exit 1
33 }