Created
January 7, 2020 21:15
-
-
Save nicksieger/fcd1e72420ddee57072ee2948a71539a 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 | |
# | |
# Homebrew has removed openssl 1.0 from the core repo, making the default | |
# openssl 1.1. We still have a number of packages that rely on openssl 1.0 | |
# (including ruby 2.2.7), so we need to bring it back. | |
# Commit 0349a7ca76f483483c6d5c1d4cfe6b458dee2665 is the commit that removed 1.0 | |
# from the repo. Commit 30fd2b68feb458656c2da2b91e577960b11c42f4 is its parent | |
# commit that still has 1.0. | |
# Uninstall 1.1 if it is currently installed as 'openssl' | |
if brew ls openssl 2>&1 | grep -q '/1\.1\.'; then | |
install_openssl11=1 | |
brew uninstall --force openssl | |
fi | |
cd $(brew --repo Homebrew/homebrew-core) | |
git fetch --unshallow | |
git checkout 30fd2b68feb458656c2da2b91e577960b11c42f4 | |
HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl | |
# Reinstall [email protected] if necessary | |
if [ "$install_openssl11" ]; then | |
brew install [email protected] | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment