-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·71 lines (54 loc) · 1.8 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
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
#!/bin/sh
command_exists() {
type "$1" > /dev/null 2>&1
}
echo "Installing dotfiles..."
#install Oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
#Remove zshrc that is installed with oh-my-zsh because we symlink our own later
rm ~/.zshrc
source symlink.sh
# Check for Homebrew and install if we don't have it
if test ! "$( command -v brew )"; then
echo "Installing homebrew"
/bin/bash "$( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh )"
fi
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# after the install, install neovim python libraries
echo -e "\\n\\nRunning Neovim Python install"
echo "=============================="
pip3 install pynvim
# Change the default shell to zsh
zsh_path="$( command -v zsh )"
if ! grep "$zsh_path" /etc/shells; then
echo "adding $zsh_path to /etc/shells"
echo "$zsh_path" | sudo tee -a /etc/shells
fi
if [[ "$SHELL" != "$zsh_path" ]]; then
chsh -s "$zsh_path"
echo "default shell changed to $zsh_path"
fi
# Install Composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
# Install global Composer packages
/usr/local/bin/composer global require laravel/installer laravel/valet
# Install global NPM packages
npm install --global yarn now doctoc
# Create a Projects directory
mkdir $HOME/Documents/Projects
mkdir $HOME/Documents/Personal-projects
# Set .ssh permissions
chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
# Set macOS preferences
# We will run this last because this will reload the shell
source osx.sh