diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-06 15:41:46 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-08 11:34:28 +0200 |
| commit | 6b02d58dd814540a1bef1fa58b2a1a02936e6717 (patch) | |
| tree | 1ba1b7be049e5d1e98708719ee866201b1aedffb /install | |
| parent | 0b92f0fe457fb541642192a02c117474e9771578 (diff) | |
| parent | 9976cc7a232927cc4ad7c83e546fbe53820bf859 (diff) | |
| download | dotfiles-6b02d58dd814540a1bef1fa58b2a1a02936e6717.tar.gz dotfiles-6b02d58dd814540a1bef1fa58b2a1a02936e6717.tar.bz2 dotfiles-6b02d58dd814540a1bef1fa58b2a1a02936e6717.zip | |
Merge branch 'master' into carbon
Diffstat (limited to 'install')
| -rwxr-xr-x | install | 72 |
1 files changed, 72 insertions, 0 deletions
@@ -0,0 +1,72 @@ +#!/bin/sh + +create_dotfile_link() +{ + ln -svf $DOTDIR/$1 $HOME/$2 +} + +create_dotfile_link_same() +{ + create_dotfile_link $1 $1 +} + +########################### +# dotfiles install script # +########################### + +# dotfiles directory +[ -z $DOTDIR ] && export DOTDIR=`pwd` + +# Creating links +create_dotfile_link_same .zshrc +create_dotfile_link_same .bashrc +create_dotfile_link_same .vimrc +create_dotfile_link_same .pluggins.vim +[ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin +create_dotfile_link grep.vim .vim/plugin/grep.vim + +[ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad +create_dotfile_link xmonad.hs .xmonad/xmonad.hs + +create_dotfile_link_same .gdbinit +create_dotfile_link_same .ghci +create_dotfile_link_same .gitconfig +create_dotfile_link_same .muttrc +create_dotfile_link_same .mailcap +create_dotfile_link_same .xinitrc +create_dotfile_link_same .zprofile + +[ ! -d $HOME/.config ] && mkdir $HOME/.config +create_dotfile_link redshift.conf .config/redshift.conf + +create_dotfile_link_same slock/config.def.h + +################ +# dependencies # +################ + +[ $# -ge 1 ] || [ "$1" = "--ln" ] && exit 0 +echo "Installing Dependencies" + +# vim Plug +PLUGFILE=$HOME/.vim/autoload/plug.vim +PLUGURL='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +[ ! -f $PLUGFILE ] && echo "Downloading plug.vim" && \ + curl -fLo $PLUGFILE --create-dirs $PLUGURL +echo "Installing plug.vim Pluggins" +vim -c "PlugInstall" -c "qa" + +# zsh pluggins +[ ! -d $HOME/.zsh ] && make $HOME/.zsh +# pure theme +[ ! -d $HOME/.zsh/pure ] && echo "Installing zsh pure theme" && \ + git clone https://github.com/sindresorhus/pure \ + $HOME/.zsh/pure +# syntax hightlighting +[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && echo "Installing zsh syntax highlighting plugin" && \ + git clone https://github.com/zsh-users/zsh-syntax-highlighting \ + $HOME/.zsh/zsh-syntax-highlighting +# you should use +[ ! -d $HOME/.zsh/zsh-you-should-use ] && echo "Installing zsh you should use plugin" && \ + git clone https://github.com/MichaelAquilina/zsh-you-should-use \ + $HOME/.zsh/zsh-you-should-use |
