From fac18643ebf3283d70c6cf109b12a8d5b229089e Mon Sep 17 00:00:00 2001 From: jefflance Date: Wed, 27 Jun 2018 16:33:18 +0200 Subject: [PATCH] Update dotbot conf. --- install | 15 --------------- install-profile | 35 +++++++++++++++++++++++++++++++++++ install-standalone | 27 +++++++++++++++++++++++++++ install.conf.yaml | 29 ----------------------------- libs/base.yaml | 12 ++++++++++++ libs/configs/abcde.yaml | 2 ++ libs/configs/ansiweather.yaml | 2 ++ libs/configs/awesome.yaml | 2 ++ libs/configs/emacs.yaml | 3 +++ libs/configs/fonts.yaml | 2 ++ libs/configs/latex.yaml | 2 ++ libs/configs/slate.yaml | 3 +++ libs/configs/tmux.yaml | 2 ++ libs/configs/vim.yaml | 3 +++ libs/configs/x.yaml | 4 ++++ libs/configs/zsh.yaml | 4 ++++ 16 files changed, 103 insertions(+), 44 deletions(-) delete mode 100755 install create mode 100755 install-profile create mode 100755 install-standalone delete mode 100644 install.conf.yaml create mode 100644 libs/base.yaml create mode 100644 libs/configs/abcde.yaml create mode 100644 libs/configs/ansiweather.yaml create mode 100644 libs/configs/awesome.yaml create mode 100644 libs/configs/emacs.yaml create mode 100644 libs/configs/fonts.yaml create mode 100644 libs/configs/latex.yaml create mode 100644 libs/configs/slate.yaml create mode 100644 libs/configs/tmux.yaml create mode 100644 libs/configs/vim.yaml create mode 100644 libs/configs/x.yaml create mode 100644 libs/configs/zsh.yaml diff --git a/install b/install deleted file mode 100755 index 5a7e72c..0000000 --- a/install +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -CONFIG="install.conf.yaml" -DOTBOT_DIR="dotbot" - -DOTBOT_BIN="bin/dotbot" -BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -cd "${BASEDIR}" -git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive -git submodule update --init --recursive "${DOTBOT_DIR}" - -"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" diff --git a/install-profile b/install-profile new file mode 100755 index 0000000..f8fda24 --- /dev/null +++ b/install-profile @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -e + +BASE_CONFIG="base" +CONFIG_SUFFIX=".yaml" + +META_DIR="libs" +CONFIG_DIR="configs" +PROFILES_DIR="profiles" + +DOTBOT_DIR="libs/github/dotbot" +DOTBOT_BIN="bin/dotbot" + +BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + + +cd "${BASE_DIR}" +git submodule update --init --recursive --remote + + +while IFS= read -r config; do + CONFIGS+=" ${config}" +done < "${META_DIR}/${PROFILES_DIR}/$1" + +shift + + +"${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c "${META_DIR}/${BASE_CONFIG}${CONFIG_SUFFIX}" + +for config in ${CONFIGS} ${@}; do + echo -e "\nConfigure $config" + configContent="$(<"${BASE_DIR}/${META_DIR}/${BASE_CONFIG}${CONFIG_SUFFIX}")\n$(<"${BASE_DIR}/${META_DIR}/${CONFIG_DIR}/${config}${CONFIG_SUFFIX}")" + "${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c <(echo -e "$configContent") +done diff --git a/install-standalone b/install-standalone new file mode 100755 index 0000000..f7138ac --- /dev/null +++ b/install-standalone @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e + +BASE_CONFIG="base" +CONFIG_SUFFIX=".yaml" + +META_DIR="libs" +CONFIG_DIR="configs" +PROFILES_DIR="profiles" + +DOTBOT_DIR="libs/github/dotbot" +DOTBOT_BIN="bin/dotbot" + +BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + + +cd "${BASE_DIR}" +git submodule update --init --recursive --remote + + +"${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c "${META_DIR}/${BASE_CONFIG}${CONFIG_SUFFIX}" + +for config in ${@}; do + configContent="$(<"${BASE_DIR}/${META_DIR}/${BASE_CONFIG}${CONFIG_SUFFIX}")\n$(<"${BASE_DIR}/${META_DIR}/${CONFIG_DIR}/${config}${CONFIG_SUFFIX}")" + "${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c <(echo -e "$configContent") +done diff --git a/install.conf.yaml b/install.conf.yaml deleted file mode 100644 index d81537b..0000000 --- a/install.conf.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- defaults: - link: - create: true - relink: true - -- clean: ['~', '~/.config'] - -- link: - ~/.abcde.conf: confs/abcde.conf - ~/.ansiweatherrc: confs/ansiweatherrc - ~/.config/awesome: awesome - ~/.emacs: emacs/emacs - ~/.emacs.d: emacs/emacs.d - ~/.fonts: fonts - ~/.latexmkr: confs/latexmkrc - ~/.tmux.conf: confs/tmux.conf - ~/.vim: vim/vim - ~/.vimrc: vim/vimrc - ~/.xbindkeysrc: x/xbindkeysrc - ~/.Xresources: x/Xresources - ~/.Xresources.d: x/Xresources.d - ~/.zshenv: zsh/zshenv - ~/.zshrc: zsh/zshrc - ~/.oh-my-zsh: zsh/oh-my-zsh - -- shell: - - git submodule sync --init --recursive - # the following have to run after linking ~/.gitconfig - - git update-submodules diff --git a/libs/base.yaml b/libs/base.yaml new file mode 100644 index 0000000..21b44be --- /dev/null +++ b/libs/base.yaml @@ -0,0 +1,12 @@ +- defaults: + link: + create: true + relink: true + +- shell: + - ["git submodule update --init --recursive", "Installing submodules"] + +- clean: [ + '~', + '~/.config' +] diff --git a/libs/configs/abcde.yaml b/libs/configs/abcde.yaml new file mode 100644 index 0000000..f605373 --- /dev/null +++ b/libs/configs/abcde.yaml @@ -0,0 +1,2 @@ +- link: + ~/.abcde.conf: confs/abcde.conf diff --git a/libs/configs/ansiweather.yaml b/libs/configs/ansiweather.yaml new file mode 100644 index 0000000..4f44ba1 --- /dev/null +++ b/libs/configs/ansiweather.yaml @@ -0,0 +1,2 @@ +- link: + ~/.ansiweatherrc: confs/ansiweatherrc diff --git a/libs/configs/awesome.yaml b/libs/configs/awesome.yaml new file mode 100644 index 0000000..f1aa773 --- /dev/null +++ b/libs/configs/awesome.yaml @@ -0,0 +1,2 @@ +- link: + ~/.config/awesome: awesome diff --git a/libs/configs/emacs.yaml b/libs/configs/emacs.yaml new file mode 100644 index 0000000..14eb009 --- /dev/null +++ b/libs/configs/emacs.yaml @@ -0,0 +1,3 @@ +- link: + ~/.emacs: emacs/emacs + ~/.emacs.d: emacs/emacs.d diff --git a/libs/configs/fonts.yaml b/libs/configs/fonts.yaml new file mode 100644 index 0000000..b97425e --- /dev/null +++ b/libs/configs/fonts.yaml @@ -0,0 +1,2 @@ +- link: + ~/.fonts: fonts diff --git a/libs/configs/latex.yaml b/libs/configs/latex.yaml new file mode 100644 index 0000000..85b02a4 --- /dev/null +++ b/libs/configs/latex.yaml @@ -0,0 +1,2 @@ +- link: + ~/.latexmkr: confs/latexmkrc diff --git a/libs/configs/slate.yaml b/libs/configs/slate.yaml new file mode 100644 index 0000000..2bb847c --- /dev/null +++ b/libs/configs/slate.yaml @@ -0,0 +1,3 @@ +- link: + ~/.slate.d: slate/slate.d + ~/.slate.js: slate/slate.js diff --git a/libs/configs/tmux.yaml b/libs/configs/tmux.yaml new file mode 100644 index 0000000..cec4ead --- /dev/null +++ b/libs/configs/tmux.yaml @@ -0,0 +1,2 @@ +- link: + ~/.tmux.conf: confs/tmux.conf diff --git a/libs/configs/vim.yaml b/libs/configs/vim.yaml new file mode 100644 index 0000000..c4deea5 --- /dev/null +++ b/libs/configs/vim.yaml @@ -0,0 +1,3 @@ +- link: + ~/.vim: vim/vim + ~/.vimrc: vim/vimrc diff --git a/libs/configs/x.yaml b/libs/configs/x.yaml new file mode 100644 index 0000000..3216d01 --- /dev/null +++ b/libs/configs/x.yaml @@ -0,0 +1,4 @@ +- link: + ~/.xbindkeysrc: x/xbindkeysrc + ~/.Xresources: x/Xresources + ~/.Xresources.d: x/Xresources.d diff --git a/libs/configs/zsh.yaml b/libs/configs/zsh.yaml new file mode 100644 index 0000000..d9eedf4 --- /dev/null +++ b/libs/configs/zsh.yaml @@ -0,0 +1,4 @@ +- link: + ~/.zshenv: zsh/zshenv + ~/.zshrc: zsh/zshrc + ~/.oh-my-zsh: zsh/oh-my-zsh