-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
93 lines (73 loc) · 2.29 KB
/
bootstrap.sh
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bash
#
# Script for setting up a new OSX machine
#
# Apps not included due to no cask being available
#
# Notes:
#
# - If installing full Xcode, it's better to install that first from the app
# store before running the bootstrap script. Otherwise, Homebrew can't access
# the Xcode libraries as the agreement hasn't been accepted yet.
#
# Usefull links:
#
# https://github.com/Homebrew/homebrew-cask/blob/master/USAGE.md
# https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716
#
# For appstore apps
# https://github.com/mas-cli/mas
# TODO NEEDD TO ADD DOCKER-COMPOSE-COMPLETION AND DOCKER-COMPLETION, VS CODE EXTENSIONS
# https://gist.github.com/mdschweda/2311e3f2c7062bf7367e44f8a7aa8b55 - vs code exts
# https://dotfiles.github.io
# Ask for password upfront and keep it alive until our script has finished
sudo -v
while true; do sudo -n true; sleep 60; kill -0 \"$$\" || exit; done 2>/dev/null &
# Load environment variables
source $HOME/dotfiles/.dotfiles_env
# Start with the homebrew stuff
echo "\nStarting install of casks and packages"
# Check for Homebrew, install if we don't have it
if ! which brew; then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
echo "\nStarting install of packages"
source $DOTFILES/.packages.sh
echo "Cleaning up..."
brew cleanup
echo "\nInstalling casks..."
source $DOTFILES/.casks.sh
echo "\nStarting install of fonts"
source $DOTFILES/.fonts.sh
echo "\nInstalling Python packages..."
PYTHON_PACKAGES=(
ipython
virtualenv
virtualenvwrapper
)
sudo pip install ${PYTHON_PACKAGES[@]}
echo "\nInstalling Ruby gems"
RUBY_GEMS=(
bundler
filewatcher
cocoapods
)
sudo gem install ${RUBY_GEMS[@]}
echo "\nInstalling global npm packages..."
npm install marked -g
echo "\nConfiguring OSX..."
source $DOTFILES/.macos.sh
echo "\nStarting VS Code and extensions."
source $DOTFILES/.vscodeextensions
echo "\nInstalling terminal replacement - iTerm + zsh +oh my zsh"
source $DOTFILES/.zshsetup.sh
#echo "Installing Mac App Store apps"
#source $DOTFILES/.mas.sh
echo "\nSwitching shell to ZSH"
chsh -s /usr/local/bin/zsh
echo "Bootstrapping complete"
echo "==============================================================="
neofetch