-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·52 lines (39 loc) · 1.56 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
# Colors
RESET=$(tput sgr0)
# shellcheck disable=SC2034
RED=$(tput setaf 1)
# shellcheck disable=SC2034
GREEN=$(tput setaf 2)
# shellcheck disable=SC2034
YELLOW=$(tput setaf 3)
# shellcheck disable=SC2034
BLUE=$(tput setaf 4)
# shellcheck disable=SC2034
MAGENTA=$(tput setaf 5)
# shellcheck disable=SC2034
CYAN=$(tput setaf 6)
# shellcheck disable=SC2034
ITALIC=$(tput sitm)
# shellcheck disable=SC2034
BOLD=$(tput bold)
set -e
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "${YELLOW}======================================================================${RESET}"
echo "${YELLOW}1. Executing install.pre ...${RESET}"
[ -f "${BASEDIR}/install.pre" ] && "${BASEDIR}/install.pre"
echo "${YELLOW}======================================================================${RESET}"
echo "${YELLOW}2. Executing install ...${RESET}"
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
echo "${YELLOW}======================================================================${RESET}"
echo "${YELLOW}3. Executing install.post ...${RESET}"
[ -f "${BASEDIR}/install.post" ] && "${BASEDIR}/install.post"
echo "${YELLOW}======================================================================${RESET}"
################################################################################
# vim: ft=bash syntax=bash cc=120 tw=119 ts=4 sw=4 sts=4 et sr