forked from postlight/headless-wp-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·23 lines (22 loc) · 903 Bytes
/
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
#!/bin/bash
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Install PHP and PHP MySQL Plugin
sudo apt-get -y install php php-mysql mysql-client
# Download and install wp-cli
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
sudo chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
# Download and install robo
wget http://robo.li/robo.phar
sudo mv robo.phar /usr/bin/robo && sudo chmod +x /usr/bin/robo
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Download and install wp-cli
brew install wp-cli
# Download and install wget
brew install wget
# Download and install robo
wget http://robo.li/robo.phar
sudo mv robo.phar /usr/local/bin/robo && sudo chmod +x /usr/local/bin/robo
else
echo "Sorry, this installation script only works on Mac OS X and Ubuntu Linux. Looks like your operating system is $OSTYPE."
fi