-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall
More file actions
executable file
·30 lines (21 loc) · 772 Bytes
/
install
File metadata and controls
executable file
·30 lines (21 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
BASE_CONFIG="base"
CONFIG_SUFFIX=".yaml"
META_DIR="meta"
CONFIG_DIR="configs"
PLUGINS_DIR="plugins"
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
CONFIGS="$(find ${META_DIR}/${CONFIG_DIR}/ -type f -name "*.yaml" -exec basename -s "${CONFIG_SUFFIX}" {} \;)"
"${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"
"${BASE_DIR}/${META_DIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
-d "${BASE_DIR}" \
-c "${META_DIR}/${CONFIG_DIR}/${config}${CONFIG_SUFFIX}"
done