Last active
August 29, 2015 14:06
-
-
Save daraosn/97b7332f2cb1092037dc to your computer and use it in GitHub Desktop.
[OSX] Shockshell bash patch
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 | |
if [ ! $(command -v brew) ]; then | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
if [ ! -f /bin/bash.bak ]; then | |
brew update | |
brew install bash | |
brew upgrade bash | |
sudo mv /bin/bash /bin/bash.bak | |
sudo rm /bin/bash | |
sudo ln -s /usr/local/bin/bash /bin/bash | |
else | |
echo "The patch has already been applied (aka you already have a /bin/bash.bak file)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment