-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·48 lines (36 loc) · 1.11 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
#!/bin/sh
DOTFILES_DIR="$HOME/dotfiles"
if [[ "$(pwd)" != $DOTFILES_DIR ]]; then
echo "\nCannot proceed with installation, pwd invalid."
echo "Please run this install script inside the following directory:"
echo "\t$DOTFILES_DIR\n"
exit 0
fi
echo "Setting up your Mac..."
# Remove macOS motd
touch $HOME/.hushlogin
# Basic filesystem setup
mkdir -p $HOME/Development
mkdir -p $HOME/.nvm
# Check for Homebrew and install if we don't have it
if test ! "$(which brew)"; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# Check for Laravel installer and install if we don't have it
if test ! "$(which laravel)"; then
composer global require laravel/installer
fi
# Check for Valet and install if we don't have it
if test ! "$(which valet)"; then
composer global require laravel/valet
"$HOME/.composer/vendor/bin/valet" install
fi
# Stow all directories to the home
stow helpers -t $HOME
rm -f $HOME/.zshrc
stow zsh -t $HOME