Updated install script and made patch folder more organized
This commit is contained in:
parent
0dac489624
commit
2161454523
149
install.sh
149
install.sh
|
@ -1,92 +1,69 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# TODO: Add eclim/eclipse installer
|
|
||||||
while true; do
|
|
||||||
read -p "Do you want to make symlinks? " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* ) if [ ! -f ~/.tmux.conf ]; then ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf; fi
|
|
||||||
if [ ! -f ~/.zshrc ]; then ln -s ~/.dotfiles/zshrc ~/.zshrc; fi
|
|
||||||
if [ ! -f ~/.vimrc ]; then ln -s ~/.dotfiles/vimrc ~/.vimrc; fi
|
|
||||||
if [ ! -d ~/.vim ]; then ln -s ~/.dotfiles/vim ~/.vim; fi
|
|
||||||
if [ ! -f ~/.gitignore ]; then ln -s ~/.dotfiles/gitignore ~/.gitignore; fi
|
|
||||||
if [ ! -f ~/.yaourtrc ]; then ln -s ~/.dotfiles/yaourtrc ~/.yaourtrc; fi
|
|
||||||
echo "Done...";
|
|
||||||
break;;
|
|
||||||
[Nn]* ) break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# while true; do
|
dotfiles="$HOME/$1"
|
||||||
# read -p "Do you wish to install gnome-terminal-colors-solarized? (requires dconf-cli) " yn
|
|
||||||
# case $yn in
|
|
||||||
# [Yy]* ) cd ..;
|
|
||||||
# git clone https://github.com/Anthony25/gnome-terminal-colors-solarized.git;
|
|
||||||
# cd gnome-terminal-colors-solarized;
|
|
||||||
# ./install.sh;
|
|
||||||
# cd ..;
|
|
||||||
# rm -rf gnome-terminal-colors-solarized;
|
|
||||||
# cd .dotfiles;
|
|
||||||
# echo "Done...";
|
|
||||||
# break;;
|
|
||||||
# [Nn]* ) break;;
|
|
||||||
# * ) echo "Please answer yes or no.";;
|
|
||||||
# esac
|
|
||||||
# done
|
|
||||||
|
|
||||||
while true; do
|
# Show help
|
||||||
read -p "Do you wish to update all submodules? " yn
|
function show_help {
|
||||||
case $yn in
|
echo "Specify directory";
|
||||||
[Yy]* ) git submodule update --init --recursive;
|
}
|
||||||
echo "Done...";
|
|
||||||
break;;
|
|
||||||
[Nn]* ) break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
while true; do
|
# Ask user
|
||||||
read -p "Do you wish to compile YCM? " yn
|
function ask {
|
||||||
case $yn in
|
while true; do
|
||||||
[Yy]* ) ./vim/bundle/YouCompleteMe/install.sh;
|
read -p "$1 [Y/n] " yn
|
||||||
echo "Done...";
|
case $yn in
|
||||||
break;;
|
* ) $2; break;;
|
||||||
[Nn]* ) break;;
|
[Nn]* ) break;;
|
||||||
* ) echo "Please answer yes or no.";;
|
esac
|
||||||
esac
|
done
|
||||||
done
|
}
|
||||||
|
|
||||||
# while true; do
|
# Update submodules
|
||||||
# read -p "Do you wish to install source code pro with powerline? " yn
|
function submodule {
|
||||||
# case $yn in
|
git submodule update --init --recursive
|
||||||
# [Yy]* ) ssudo curl -fsSL https://github.com/Lokaltog/powerline-fonts/raw/master/SourceCodePro/Sauce%20Code%20Powerline%20Regular.otf -o /usr/local/bin/tmux-vim-select-pane;
|
}
|
||||||
# echo "Done...";
|
# Apply patches
|
||||||
# break;;
|
function patch {
|
||||||
# [Nn]* ) break;;
|
cd $dotfiles/oh-my-zsh
|
||||||
# * ) echo "Please answer yes or no.";;
|
git am $dotfiles/patches/oh-my-zsh/*.patch
|
||||||
# esac
|
}
|
||||||
# done
|
|
||||||
#
|
|
||||||
# while true; do
|
|
||||||
# read -p "Do you wish to install tmux-vim-select-pane? " yn
|
|
||||||
# case $yn in
|
|
||||||
# [Yy]* ) sudo curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane;
|
|
||||||
# sudo chmod +x /usr/local/bin/tmux-vim-select-pane;
|
|
||||||
# echo "Done...";
|
|
||||||
# break;;
|
|
||||||
# [Nn]* ) break;;
|
|
||||||
# * ) echo "Please answer yes or no.";;
|
|
||||||
# esac
|
|
||||||
# done
|
|
||||||
#
|
|
||||||
# while true; do
|
|
||||||
# read -p "Do you wish to install CTags? " yn
|
|
||||||
# case $yn in
|
|
||||||
# [Yy]* ) sudo apt-get install exuberant-ctags;
|
|
||||||
# echo "Done...";
|
|
||||||
# break;;
|
|
||||||
# [Nn]* ) break;;
|
|
||||||
# * ) echo "Please answer yes or no.";;
|
|
||||||
# esac
|
|
||||||
# done
|
|
||||||
|
|
||||||
echo "Done installing...";
|
# Comple YouCompleteMe
|
||||||
|
function ycm {
|
||||||
|
$dotfiles/vim/bundle/YouCompleteMe/install.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install tmux-vim-select-pane
|
||||||
|
function tvpane {
|
||||||
|
sudo curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane
|
||||||
|
sudo chmod +x /usr/local/bin/tmux-vim-select-pane
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install fonts
|
||||||
|
function fonts {
|
||||||
|
curl -fsSL https://github.com/Lokaltog/powerline-fonts/raw/master/SourceCodePro/Sauce%20Code%20Powerline%20Regular.otf -o "$HOME/.fonts/Sauce Code Powerline Regular.otf"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Setup symlinks to config files
|
||||||
|
function symlink {
|
||||||
|
if [ ! -f ~/.tmux.conf ]; then ln -s $dotfiles/tmux.conf ~/.tmux.conf; fi
|
||||||
|
if [ ! -f ~/.zshrc ]; then ln -s $dotfiles/zshrc ~/.zshrc; fi
|
||||||
|
if [ ! -f ~/.vimrc ]; then ln -s $dotfiles/vimrc ~/.vimrc; fi
|
||||||
|
if [ ! -f ~/.yaourtrc ]; then ln -s $dotfiles/yaourtrc ~/.yaourtrc; fi
|
||||||
|
if [ ! -d ~/.vim ]; then ln -s $dotfiles/vim ~/.vim; fi
|
||||||
|
if [ ! -d ~/.local/bin/scripts ]; then ln -s $dotfiles/scripts ~/.local/bin/scripts; fi
|
||||||
|
echo "All symlink have been made"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then show_help; exit 0; fi;
|
||||||
|
|
||||||
|
cd $dotfiles
|
||||||
|
|
||||||
|
# Ask and execute the install script
|
||||||
|
ask "Update submodules" submodule
|
||||||
|
ask "Patch submodules" patch
|
||||||
|
ask "Compile YCM" ycm
|
||||||
|
ask "Install tmux-vim-select-pane" tvpane
|
||||||
|
ask "Install fonts" fonts
|
||||||
|
# ask "Install gnome-terminal theme"
|
||||||
|
ask "Make symlinks" symlink
|
||||||
|
|
Loading…
Reference in New Issue
Block a user