-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·36 lines (28 loc) · 881 Bytes
/
install
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
33
34
35
36
#!/usr/bin/env zsh
# SPDX-FileCopyrightText: 2023 Jerin Joy
#
# SPDX-License-Identifier: Apache-2.0
set -e
CONFIG="base"
SUFFIX=".install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"
case "$(uname)" in
Darwin)
OSNAME="macos"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${OSNAME}${SUFFIX}" "${@}"
;;
Linux)
OSNAME="linux"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${OSNAME}${SUFFIX}" --plugin-dir "{BASEDIR}/dotbot-apt" "${@}"
;;
*)
echo "Unsupported OS"
exit 1
;;
esac
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}${SUFFIX}" "${@}"