forked from alvaropinot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·43 lines (34 loc) · 1.21 KB
/
install.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
#!/bin/bash
set -x # echo on
# 1
# Install Homebrew -> https://brew.sh/
# This script will take care of installing Command Line Tools for Xcode
# as today.
# TODO: add if here
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install all the deps listed in brew.sh
./brew.sh
# Global npm packages
# My beloved prompt :)
npm i -g pure-prompt
# Add brew's zsh binary path to the list of allowed shells
ZSH_PATH=$(which zsh)
# if the path is not already present.
if ! grep -qe "^$ZSH_PATH$" "/etc/shells"; then
echo "brew's zsh -> $ZSH_PATH added to the list of allowed terminals at /etc/shells"
sudo bash -c 'echo $(which zsh) >> /etc/shells'
fi
# Set up `zsh` as default.
# NOTE: After installing everything with brew, zsh should be updated to the latest version.
echo "Setting up zsh as default"
chsh -s $ZSH_PATH
# Create symlinks for the .dotfiles
./symlink-setup.sh
# Git credentials
GIT_AUTHOR_NAME="Matthew Weeks"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="weeksling@gmail.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"