install required tools before install yadr
This commit is contained in:
parent
63c8a6efc4
commit
b2811947f3
29
Rakefile
29
Rakefile
@ -32,10 +32,6 @@ task :install => [:submodule_init, :submodules] do
|
||||
Rake::Task["install_vundle"].execute
|
||||
end
|
||||
|
||||
Rake::Task["install_utilities"].execute
|
||||
|
||||
Rake::Task["install_zsh"].execute
|
||||
|
||||
Rake::Task["install_ycm"].execute
|
||||
|
||||
Rake::Task["install_prezto"].execute
|
||||
@ -55,31 +51,6 @@ task :install_prezto do
|
||||
end
|
||||
end
|
||||
|
||||
task :install_utilities do
|
||||
run %{
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
brew install git
|
||||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
|
||||
apt install git fc-cache -y
|
||||
fi
|
||||
}
|
||||
end
|
||||
|
||||
task :install_zsh do
|
||||
if want_to_install?('zsh')
|
||||
run %{
|
||||
which zsh
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
brew install zsh
|
||||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
|
||||
apt install zsh -y
|
||||
fi
|
||||
fi
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
task :install_ycm do
|
||||
if want_to_install?('YouCompleteMe')
|
||||
run %{
|
||||
|
24
install.sh
24
install.sh
@ -1,5 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
exists () {
|
||||
which $1 &> /dev/null; echo $?
|
||||
}
|
||||
|
||||
declare -a tools=("zsh" "git" "rake")
|
||||
|
||||
for tool in "${tools[@]}"; do
|
||||
if [ `exists $tool` != "0" ]; then
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
brew install $tool
|
||||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
|
||||
apt $tool -y
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ `exists fc-cache` != "0" ]; then
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
brew install fontconfig
|
||||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
|
||||
apt fc-cache -y
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/.yadr" ]; then
|
||||
echo "Installing YADR for the first time"
|
||||
git clone --depth=1 https://github.com/rallets-network/dotfiles.git "$HOME/.yadr"
|
||||
|
Loading…
Reference in New Issue
Block a user