-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·30 lines (25 loc) · 899 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
#!/usr/bin/env bash
set -e
CONFIG="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}"
echo "Is this a first time install?(Will download brew and setup zsh if it is)"
select fpc in Full Partial Clean; do
case $fpc in
Full)
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" --plugin-dir dotbot-brew -c "${CONFIG}" "${@}"
;;
Partial)
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" --except shell brew tap cask -c "${CONFIG}" "${@}"
;;
Clean)
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" --only clean -c "${CONFIG}" "${@}"
;;
*)
break;;
esac
done