From 943caa71abf9f161338cd89869bdb7c236309751 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Mon, 26 Dec 2016 12:05:09 +0100 Subject: adding dotbot --- .gitignore | 2 +- .gitmodules | 3 +++ dotfiles/zshrc | 1 + install | 14 ++++++++++++++ install.conf.yaml | 32 ++++++++++++++++++++++++++++++++ lib/dotbot | 1 + 6 files changed, 52 insertions(+), 1 deletion(-) create mode 100755 install create mode 100644 install.conf.yaml create mode 160000 lib/dotbot diff --git a/.gitignore b/.gitignore index 2e2576e..85c9235 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ Icon *~ # - +usr/ diff --git a/.gitmodules b/.gitmodules index e19d83d..fc39533 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "lib/tmux/tmux-sensible"] path = lib/tmux/tmux-sensible url = https://github.com/tmux-plugins/tmux-sensible.git +[submodule "lib/dotbot"] + path = lib/dotbot + url = https://github.com/anishathalye/dotbot diff --git a/dotfiles/zshrc b/dotfiles/zshrc index fbe354e..066ca80 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -236,6 +236,7 @@ bindkey "^[[6~" down-line-or-history # if [ -f ~/.zshrc.local ]; then source ~/.zshrc.local; fi +if [ -f ~/.dotconfig ]; then source ~/.dotconfig; fi # Also, we do zsh-syntax-highlighting here, because it needs to be at the end. diff --git a/install b/install new file mode 100755 index 0000000..cc15334 --- /dev/null +++ b/install @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +CONFIG="install.conf.yaml" +DOTBOT_DIR="lib/dotbot" + +DOTBOT_BIN="bin/dotbot" +BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cd "${BASEDIR}" +git submodule update --init --recursive "${DOTBOT_DIR}" + +"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" diff --git a/install.conf.yaml b/install.conf.yaml new file mode 100644 index 0000000..cd889f5 --- /dev/null +++ b/install.conf.yaml @@ -0,0 +1,32 @@ +- defaults: + link: + force: true + relink: true + +- clean: + - '~' + +- shell: + - + - git submodule update --init --recursive + - Initializing submodules + - + - git submodule foreach git pull origin master + - Updating submodules + - + - mkdir -p ~/.cache/zsh/chpwd-recent-dirs & mkdir -p ~/.cache/zsh/completion-cache & mkdir usr + - Creating directory structure + - + - 'echo "export DOTHOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"" > usr/dotconfig' + - Setting up home directory + +- link: + $HOME/.dotconfig: usr/dotconfig + $HOME/.profile: dotfiles/profile + $HOME/.zshrc: dotfiles/zshrc + $HOME/.vimrc: dotfiles/vimrc + $HOME/.tmux.conf: dotfiles/tmux.conf + $HOME/.inputrc: dotfiles/inputrc + $HOME/.gitconfig: dotfiles/gitconfig + $HOME/.gitignore: dotfiles/gitignore + $HOME/.gitmessage: dotfiles/gitmessage diff --git a/lib/dotbot b/lib/dotbot new file mode 160000 index 0000000..847cb10 --- /dev/null +++ b/lib/dotbot @@ -0,0 +1 @@ +Subproject commit 847cb101d486319da882f958b1cb58b515cc6db2 -- cgit v1.2.3