-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·34 lines (24 loc) · 904 Bytes
/
Copy pathinstall
File metadata and controls
executable file
·34 lines (24 loc) · 904 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
31
32
#!/usr/bin/env bash
set -e
source /etc/os-release
CFG_FILE="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_PLUGINS="${BASEDIR}/dotbot-plugins"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEFAULT_CFG_DIR="${BASEDIR}/dotbot-config"
FINAL_CFG_DIR="${DEFAULT_CFG_DIR}/final_common"
cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"
if [[ $ID == "debian" ]] || [[ $ID_LIKE == "debian" ]]; then
PLATFORM_CFG_DIR="${DEFAULT_CFG_DIR}/debian"
elif [[ $ID == "arch" ]] || [[ $ID_LIKE == "arch" ]]; then
PLATFORM_CFG_DIR="${DEFAULT_CFG_DIR}/arch"
fi
declare -a paths=( ${DEFAULT_CFG_DIR} ${PLATFORM_CFG_DIR} ${FINAL_CFG_DIR} )
for dir in ${paths[@]}
do
echo $dir
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${dir}" -c "${dir}/${CFG_FILE}" --plugin-dir "${BASEDIR}/.plugins"
done