generated from anishathalye/dotfiles_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·32 lines (23 loc) · 912 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
#!/usr/bin/env bash
set -e
# get password prompt out of the way early
sudo echo Ready to go...
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
# Pre-reqs, do them before dotbot
. "${BASEDIR}"/setup-homebrew.sh
[ "$(uname)" == "Linux" ] && command -v apt-get && sudo apt-get update -y
[ "$(uname)" == "Linux" ] && command -v dnf && sudo dnf update -y
[ "$(uname)" == "Darwin" ] && brew update
[ "$(uname)" == "Darwin" ] && eval "$(/opt/homebrew/bin/brew shellenv)"
# ./setup-python.sh
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
if [ "$(uname)" = "Darwin" ]; then
echo "Run the following command or restart your shell"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'
fi