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
5bd590ce
Commit
5bd590ce
authored
Mar 08, 2014
by
Andrew Vit
Browse files
Reference default install path from ZSH variable
parent
a811ab0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/install.sh
View file @
5bd590ce
ZSH
=
`
/usr/bin/env|grep
'ZSH='
|cut
-d
'='
-f
2
`
if
[
!
-n
$ZSH
]
if
[
-d
"
$ZSH
"
]
then
then
echo
"
\0
33[0;33mYou already have Oh My Zsh installed.
\0
33[0m You'll need to remove
$ZSH
if you want to install"
ZSH
=
~/.oh-my-zsh
exit
fi
elif
[
-d
~/.oh-my-zsh
]
if
[
-d
$ZSH
]
then
then
echo
"
\0
33[0;33mYou already have
One
Oh My Zsh
Directory
.
\0
33[0m You'll need to remove
~/.oh-my-zsh
if you want to
clone
"
echo
"
\0
33[0;33mYou already have Oh My Zsh
installed
.
\0
33[0m You'll need to remove
$ZSH
if you want to
install
"
exit
exit
fi
fi
echo
"
\0
33[0;34mCloning Oh My Zsh...
\0
33[0m"
echo
"
\0
33[0;34mCloning Oh My Zsh...
\0
33[0m"
hash
git
>
/dev/null
&&
/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git
~/.oh-my-zsh
||
{
hash
git
>
/dev/null
&&
/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
echo
"git not installed"
echo
"git not installed"
exit
exit
}
}
...
@@ -23,7 +23,7 @@ then
...
@@ -23,7 +23,7 @@ then
fi
fi
echo
"
\0
33[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc
\0
33[0m"
echo
"
\0
33[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc
\0
33[0m"
cp
~/.oh-my-zsh
/templates/zshrc.zsh-template ~/.zshrc
cp
$ZSH
/templates/zshrc.zsh-template ~/.zshrc
echo
"
\0
33[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.
\0
33[0m"
echo
"
\0
33[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.
\0
33[0m"
sed
-i
-e
"/export PATH=/ c
\\
sed
-i
-e
"/export PATH=/ c
\\
...
...
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