1
0
Fork 0

Update install script to load OS-specific config

This commit is contained in:
Jeremy Kaplan 2019-11-08 17:25:35 -08:00 committed by Jeremy Kaplan
commit 2484150d3f

15
install
View file

@ -12,6 +12,17 @@ BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}" cd "${BASEDIR}"
git submodule update --init --recursive "${DOTBOT_DIR}" git submodule update --init --recursive "${DOTBOT_DIR}"
for conf in default ${@}; do load_config() {
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${conf}${CONFIG_SUFFIX}" config="$1"
if [ -f "${config}" ]; then
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${config}"
else
echo "Skipping nonexistent file: ${config}"
fi
}
OS_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')"
for conf in default ${@} "${OS_NAME}"; do
load_config "${conf}${CONFIG_SUFFIX}"
done done