forked from driesvints/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·92 lines (71 loc) · 2.72 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/sh
echo "Setting up your Mac..."
# 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
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# Make ZSH the default shell environment
chsh -s $(which zsh)
# Check if PHP version file could be found, if not create it
if [[ ! -f "$HOME/.php_version" ]]; then
echo "7.2" > "$HOME/.php_version"
fi
# Install Composer
if test ! $(which composer); then
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
fi
# Install global Composer packages
/usr/local/bin/composer global require laravel/installer \
laravel/spark-installer laravel/valet pyrech/composer-changelogs phpmd/phpmd \
squizlabs/php_codesniffer laravel/spark-installer
# Install global NPM packages
npm install --global yarn vtop fsevents ghost-cli npm pure-prompt yarn
# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles
rm -rf $HOME/.zshrc
ln -s $HOME/.dotfiles/.zshrc $HOME/.zshrc
# Symlink the Mackup config file to the home directory
ln -s $HOME/.dotfiles/.mackup.cfg $HOME/.mackup.cfg
# Ultimate VIM
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
ln -s "$HOME/.dotfiles/my_configs.vim" "$HOME/.vim_runtime/my_configs.vim"
# Powerline fonts download and setup
git clone [email protected]:powerline/fonts.git ~/powerline-fonts
~/powerline-fonts/install.sh
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/zsh-syntax-highlighting
# ZSH Autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
# Symlink CURL formatter for speed test
ln -s "$HOME/.dotfiles/curl-format.txt" curl-format.txt
# Security
# Disable remote login
sudo systemsetup -setremotelogin off
# Disable wake-on modem
sudo systemsetup -setwakeonmodem off
# Disable wake-on LAN
sudo systemsetup -setwakeonnetworkaccess off
# Disable remote apple events
sudo systemsetup -setremoteappleevents off
sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool false
# Git hooks
rm -rf "$HOME/.git-hooks"
ln -s "$HOME/.dotfiles/git-hooks" "$HOME/.git-hooks"
# Autojump
git clone git://github.com/wting/autojump.git ~/autojump
~/autojump
./install.py
if [[ ! -d ~/.dotfiles.d ]]; then
mkdir ~/.dotfiles.d
fi
# Install FZF
/usr/local/opt/fzf/install
# Set macOS preferences
# We will run this last because this will reload the shell
source .macos