up confs
This commit is contained in:
parent
fb876e6c74
commit
cc20e3ee60
35
install-profile.bak
Executable file
35
install-profile.bak
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BASE_CONFIG="base"
|
||||||
|
CONFIG_SUFFIX=".yaml"
|
||||||
|
|
||||||
|
META_DIR="meta"
|
||||||
|
CONFIG_DIR="tasks"
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
while IFS= read -r config; do
|
||||||
|
CONFIGS+=" ${config}"
|
||||||
|
done < "${META_DIR}/${PROFILES_DIR}/$1"
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
|
|
||||||
|
"${BASE_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}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c <(echo -e "$configContent")
|
||||||
|
done
|
28
install-standalone.bak
Executable file
28
install-standalone.bak
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BASE_CONFIG="base"
|
||||||
|
CONFIG_SUFFIX=".yaml"
|
||||||
|
|
||||||
|
META_DIR="meta"
|
||||||
|
CONFIG_DIR="tasks"
|
||||||
|
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
|
||||||
|
# git submodule update --recursive --remote
|
||||||
|
|
||||||
|
|
||||||
|
"${BASE_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}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASE_DIR}" -c <(echo -e "$configContent")
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user