-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·48 lines (37 loc) · 1.25 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
install() {
echo "Setting up your Mac..."
# Check for Homebrew and install it if it isn't already
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
# 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/lumen-installer
# Install global NPM packages
yarn global add vue-cli
# Install OhMyZsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
# Last but not least, let's init!
bash init.sh
}
# Prevent the setup procedure from being fired accidentally.
case $1 in
"-f" | "--force")
install ;;
*)
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
install
else
echo "Setting up your Mac was cancelled!"
fi
esac