forked from driesvints/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·75 lines (51 loc) · 1.94 KB
/
install
File metadata and controls
executable file
·75 lines (51 loc) · 1.94 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
# Automated installer for dguay
function pecho() {
local PRINT_COLOR=6
if [[ ! -z "$2" ]] ; then
PRINT_COLOR=$2
fi
echo -ne "$(tput setaf "${PRINT_COLOR}")$1$(tput sgr0)"
}
###############################################################################
# Dotbot install
###############################################################################
pecho "Linking with Dotbot:...\n"
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
###############################################################################
# Homebrew and ZSH configurations
###############################################################################
pecho "Installing Homebrew...\n"
# Check for Homebrew and install if we don't have it
if test ! $(which brew); then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
pecho "Updating Homebrew recipes...\n"
# Update Homebrew recipes
brew update
pecho "Installing all apps and dependencies with brew bundle (from Brewfile)...\n"
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
pecho "Make ZSH the default shell...\n"
# Make ZSH the default shell environment
chsh -s $(which zsh)
pecho "Installing zplug...\n"
# Install zplug if it's not installed.
if [[ ! -d ~/.zplug ]];then
git clone https://github.com/b4b4r07/zplug ~/.zplug
fi
###############################################################################
# macOS preferences
###############################################################################
pecho "Set macOS preferences...\n"
# Set macOS preferences
# We will run this last because this will reload the shell
source macos
pecho "Done!"