aboutsummaryrefslogblamecommitdiff
path: root/install
blob: 8816b6b8cab16db5e56d8e3ecb38fe4028d30361 (plain) (tree)
1
2
3
4
5
6
7
8
                   






                                                               





                                                             

                                                       

                                                               

                                                             
                                               
                                     

                                                         
 







                                                                         
                                                           

  
#!/usr/bin/env bash

# Check out submodules. The --git-dir option doesn't work here.
cd "${HOME}/.dotfiles"
git submodule --quiet update --init
cd "${OLDPWD}"

# Link in files, replacing whatever's already there.
ln -fs ".dotfiles/bash/bashrc"        "${HOME}/.bashrc"
ln -fs ".dotfiles/bash/bash_profile"  "${HOME}/.bash_profile"
ln -fs ".dotfiles/bash/bash_logout"   "${HOME}/.bash_logout"
ln -fs ".dotfiles/git/gitconfig"      "${HOME}/.gitconfig"
ln -fs ".dotfiles/readline/inputrc"   "${HOME}/.inputrc"
ln -fs ".dotfiles/tmux/tmux.conf"     "${HOME}/.tmux.conf"
ln -fs ".dotfiles/vim/vimrc"          "${HOME}/.vimrc"
ln -fs ".dotfiles/vim/gvimrc"         "${HOME}/.gvimrc"

# Link in directories, removing whatever's already there first.
[[ -e "${HOME}/.newsbeuter" ]] && rm -r "${HOME}/.newsbeuter"
ln -fs ".dotfiles/newsbeuter" "${HOME}/.newsbeuter"
[[ -e "${HOME}/.vim" ]] && rm -r "${HOME}/.vim"
ln -fs ".dotfiles/vim" "${HOME}/.vim"
[[ -e "${HOME}/.terminfo" ]] && rm -r "${HOME}/.terminfo"
ln -fs ".dotfiles/terminfo" "${HOME}/.terminfo"

# Optionally link in X and Awesome stuff.
if [[ $1 == "-X" ]]; then
    ln -fs ".dotfiles/X/Xmodmap"     "${HOME}/.Xmodmap"
    ln -fs ".dotfiles/X/Xresources"  "${HOME}/.Xresources"
    ln -fs ".dotfiles/X/xsession"    "${HOME}/.xsession"
    ln -fs ".dotfiles/X/xsessionrc"  "${HOME}/.xsessionrc"
    mkdir -p "${HOME}/.config"
    [[ -e "${HOME}/.config/awesome" ]] && rm -r "${HOME}/.config/awesome"
    ln -fs "../.dotfiles/awesome" "${HOME}/.config/awesome"
fi