mirror of
https://github.com/vbrandl/dotfiles
synced 2024-11-26 17:35:12 +01:00
35 lines
718 B
Plaintext
35 lines
718 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
BASE_CONFIG="base"
|
||
|
CONFIG_SUFFIX=".yaml"
|
||
|
|
||
|
META_DIR="meta"
|
||
|
CONFIG_DIR="configs"
|
||
|
PROFILES_DIR="profiles"
|
||
|
|
||
|
DOTBOT_DIR="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 $config
|
||
|
"${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c "${META_DIR}/${CONFIG_DIR}/${config}${CONFIG_SUFFIX}"
|
||
|
done
|