#!/usr/bin/env bash # Just stop if any problems set -o errexit # Refuse to expand empty variables set -o nounset # Define dotfiles directory dotfiles=$HOME/.dotfiles # Check out submodules (cd $dotfiles && git submodule --quiet update --init ) # Link in essentials ln -insv $dotfiles/bash/bashrc $HOME/.bashrc ln -insv $dotfiles/bash/bashrc.d $HOME/.bashrc.d ln -insv $dotfiles/readline/inputrc $HOME/.inputrc ln -insv $dotfiles/sh/profile $HOME/.profile ln -insv $dotfiles/sh/profile.d $HOME/.profile.d ln -insv $dotfiles/terminfo $HOME/.terminfo ln -insv $dotfiles/vim/vimrc $HOME/.vimrc ln -insv $dotfiles/vim $HOME/.vim # Link in shell stuff. while getopts :gmnptx opt do case $opt in g) ln -insv $dotfiles/git/gitconfig $HOME/.gitconfig ;; m) ln -insv $dotfiles/mutt/muttrc $HOME/.muttrc ln -insv $dotfiles/mutt $HOME/.mutt ;; n) mkdir -pv $HOME/.config $HOME/.local/share/newsbeuter ln -insv $dotfiles/newsbeuter $HOME/.config ;; p) mkdir -pv $HOME/.gnupg ln -insv $dotfiles/gnupg/gpg.conf $HOME/.gnupg ln -insv $dotfiles/gnupg/gpg-agent.conf $HOME/.gnupg ;; t) ln -insv $dotfiles/tmux/tmux.conf $HOME/.tmux.conf ;; x) mkdir -pv $HOME/.config ln -insv $dotfiles/X/Xmodmap $HOME/.Xmodmap ln -insv $dotfiles/X/Xresources $HOME/.Xresources ln -insv $dotfiles/X/xsession $HOME/.xsession ln -insv $dotfiles/X/xsessionrc $HOME/.xsessionrc ln -insv $dotfiles/vim/gvimrc $HOME/.gvimrc ln -insv $dotfiles/awesome $HOME/.config/awesome ;; esac done shift $((OPTIND-1))