Update dotbot conf.

This commit is contained in:
Jeff Lance 2018-06-27 16:33:18 +02:00
parent 775e39c46c
commit fac18643eb
16 changed files with 103 additions and 44 deletions

15
install
View File

@ -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}" "${@}"

35
install-profile Executable file
View File

@ -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

27
install-standalone Executable file
View File

@ -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

View File

@ -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

12
libs/base.yaml Normal file
View File

@ -0,0 +1,12 @@
- defaults:
link:
create: true
relink: true
- shell:
- ["git submodule update --init --recursive", "Installing submodules"]
- clean: [
'~',
'~/.config'
]

2
libs/configs/abcde.yaml Normal file
View File

@ -0,0 +1,2 @@
- link:
~/.abcde.conf: confs/abcde.conf

View File

@ -0,0 +1,2 @@
- link:
~/.ansiweatherrc: confs/ansiweatherrc

View File

@ -0,0 +1,2 @@
- link:
~/.config/awesome: awesome

3
libs/configs/emacs.yaml Normal file
View File

@ -0,0 +1,3 @@
- link:
~/.emacs: emacs/emacs
~/.emacs.d: emacs/emacs.d

2
libs/configs/fonts.yaml Normal file
View File

@ -0,0 +1,2 @@
- link:
~/.fonts: fonts

2
libs/configs/latex.yaml Normal file
View File

@ -0,0 +1,2 @@
- link:
~/.latexmkr: confs/latexmkrc

3
libs/configs/slate.yaml Normal file
View File

@ -0,0 +1,3 @@
- link:
~/.slate.d: slate/slate.d
~/.slate.js: slate/slate.js

2
libs/configs/tmux.yaml Normal file
View File

@ -0,0 +1,2 @@
- link:
~/.tmux.conf: confs/tmux.conf

3
libs/configs/vim.yaml Normal file
View File

@ -0,0 +1,3 @@
- link:
~/.vim: vim/vim
~/.vimrc: vim/vimrc

4
libs/configs/x.yaml Normal file
View File

@ -0,0 +1,4 @@
- link:
~/.xbindkeysrc: x/xbindkeysrc
~/.Xresources: x/Xresources
~/.Xresources.d: x/Xresources.d

4
libs/configs/zsh.yaml Normal file
View File

@ -0,0 +1,4 @@
- link:
~/.zshenv: zsh/zshenv
~/.zshrc: zsh/zshrc
~/.oh-my-zsh: zsh/oh-my-zsh