Last active
January 6, 2019 07:16
-
-
Save raupie/3fa67ba991dcbf5de1c49ceeb9c773ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############# | |
| # Dreamhost Development Tools (Composer, WP-CLI, Deployer) | |
| # Usage: curl https://gist.githubusercontent.com/raupie/3fa67ba991dcbf5de1c49ceeb9c773ac/raw | bash | |
| ############# | |
| PHPRC_FILE=~/.php/7.0/phprc | |
| # enable phar.so | |
| if grep -xq "extension = phar.so" $PHPRC_FILE | |
| then | |
| echo "phar.so already enabled, skipping..." | |
| else | |
| echo "enabling phar.so" | |
| echo "extension = phar.so" >> $PHPRC_FILE | |
| echo "suhosin.executor.include.whitelist = phar" >> $PHPRC_FILE | |
| fi | |
| # install composer | |
| wget ~ https://getcomposer.org/installer | |
| php ~/installer | |
| rm -rf ~/installer | |
| mkdir -p ~/.php/composer | |
| chmod +x ~/composer.phar | |
| mv ~/composer.phar ~/.php/composer/composer | |
| #install wp-cli | |
| wget -P ~ https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
| mkdir -p ~/.php/wp | |
| chmod +x ~/wp-cli.phar | |
| mv ~/wp-cli.phar ~/.php/wp/wp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment