Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
220d69b2
Commit
220d69b2
authored
May 26, 2019
by
Marc Cornellà
Browse files
installer: allow configuration of remote URL to clone from
parent
aa27430e
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/install.sh
View file @
220d69b2
...
@@ -11,16 +11,17 @@
...
@@ -11,16 +11,17 @@
#
#
# Respects these environment variables for tweaking the installation process:
# Respects these environment variables for tweaking the installation process:
# REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh)
# 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
set
-e
# Default settings
# Default settings
ZSH
=
${
ZSH
:-
~/.oh-my-zsh
}
ZSH
=
${
ZSH
:-
~/.oh-my-zsh
}
REPO
=
${
REPO
:-
robbyrussell
/oh-my-zsh
}
REPO
=
${
REPO
:-
robbyrussell
/oh-my-zsh
}
REMOTE
=
${
REMOTE
:-
https
://github.com/
${
REPO
}
.git
}
BRANCH
=
${
BRANCH
:-
master
}
BRANCH
=
${
BRANCH
:-
master
}
command_exists
()
{
command_exists
()
{
command
-v
"
$@
"
>
/dev/null 2>&1
command
-v
"
$@
"
>
/dev/null 2>&1
}
}
...
@@ -76,7 +77,7 @@ setup_ohmyzsh() {
...
@@ -76,7 +77,7 @@ setup_ohmyzsh() {
exit
1
exit
1
fi
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"
error
"git clone of oh-my-zsh repo failed"
exit
1
exit
1
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment