fix install zsh task in rakefile

This commit is contained in:
hophacker 2018-12-30 15:23:58 +08:00
parent c639430aa9
commit ff672290d4

View File

@ -57,10 +57,10 @@ task :install_zsh do
if want_to_install?('zsh')
run %{
which zsh
if [ $? != 0 ]; then
if [ "$(uname)" == "Darwin" ]; then
if [ $? -ne 0 ]; then
if [ "$(uname)" = "Darwin" ]; then
brew install zsh
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
apt install zsh -y
fi
fi
@ -159,7 +159,6 @@ end
task :default => 'install'
private
def run(cmd)
puts "[Running] #{cmd}"