Created
June 23, 2021 17:41
-
-
Save Greg-Boggs/6f810791d15927363536dd6e786a3ece to your computer and use it in GitHub Desktop.
This file contains 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 | |
#set -e | |
cd ~ | |
xcode-select --install | |
# install homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
#composer | |
brew install composer | |
export PATH=./vendor/bin:~/.composer/vendor/bin:/usr/local/bin:/usr/local/sbin:$PATH | |
cask_args appdir: '/Applications' | |
# Browsers | |
brew install --cask google-chrome | |
brew install --cask firefox | |
#IDE | |
brew install --cask phpstorm | |
#Lando | |
brew install lando | |
#cli utils | |
brew install curl | |
brew install git | |
brew install wget | |
brew install nvm | |
nvm use node | |
# Set some standard git configuration | |
git config --global pull.rebase true | |
installed=`ls ~/.oh-my-zsh | grep -i 'oh-my-zsh'` | |
if [ "$installed" == "" ] ; then | |
echo $'\n' | |
echo ' Installing Oh My ZSH' | |
echo $'\n' | |
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh | |
echo "export PATH=./vendor/bin:~/.composer/vendor/bin:/usr/local/bin:/usr/local/sbin:$PATH" >> ~/.zshrc | |
mkdir -pv ~/.oh-my-zsh/custom | |
cp config/ts.zsh ~/.oh-my-zsh/custom/ts.zsh | |
fi | |
echo $'\n' | |
echo "Configuring Frontend tools with Ruby and Rbenv" | |
echo $'\n' | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi'>> ~/.zshrc | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi'>> ~/.bashrc | |
rbenv install 2.6.5 | |
rbenv global 2.6.5 | |
installed=`which bundler` | |
if [ "$installed" == "" ] ; then | |
echo $'\n' | |
echo "Installing Bundler" | |
echo $'\n' | |
~/.rbenv/shims/gem install bundler | |
fi | |
installed=`which gulp` | |
if [ "$installed" == "" ] ; then | |
echo $'\n' | |
echo 'Installing gulp' | |
echo $'\n' | |
npm install --global gulp-cli | |
fi | |
composer global require hirak/prestissimo | |
composer global require consolidation/cgr | |
cgr squizlabs/php_codesniffer "^2.9" | |
cgr drupal/coder | |
cgr wp-coding-standards/wpcs | |
curl -fsS https://platform.sh/cli/installer | php | |
cgr drush/drush "^8.0" | |
cgr drupal/console | |
phpcs --config-set installed_paths ~/.composer/global/drupal/coder/vendor/drupal/coder/coder_sniffer | |
#!/bin/bash | |
if brew list php; then | |
echo $'\n' | |
echo "Configuring PHP" | |
echo $'\n' | |
echo $'\n' | |
echo "Installing PECL extensions (xdebug) for each version of PHP" | |
echo $'\n' | |
brew unlink php | |
for VER in 7.2 7.3 7.4 | |
do | |
brew link --force php@$VER | |
php -v | |
pecl install -f xdebug | |
brew unlink php@$VER | |
done | |
echo $'\n' | |
echo "Installing TS config for each version of PHP" | |
echo $'\n' | |
for VER in 7.2 7.3 7.4 | |
do | |
$(brew --prefix gettext)/bin/envsubst < config/php-ts.ini > $(brew --prefix)/etc/php/$VER/conf.d/php-ts.ini | |
done | |
# Install cgr scripts under oldest php version for backwards compat | |
brew unlink php | |
brew link --force php@7.2 | |
source scripts/cgr.sh | |
brew unlink php@7.2 | |
echo $'\n' | |
echo "Starting PHP." | |
echo $'\n' | |
brew link php | |
brew services start php | |
mkdir -pv ~/.drush | |
cp -n config/drushrc.php ~/.drush/drushrc.php | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment