Created
February 7, 2012 11:52
-
-
Save samnang/1759336 to your computer and use it in GitHub Desktop.
Install Bash version 4 on MacOS X
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
# Install Bash 4 using homebrew | |
brew install bash | |
# Or build it from source... | |
curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz | |
tar xzf bash-4.2.tar.gz | |
cd bash-4.2 | |
./configure --prefix=/usr/local/bin && make && sudo make install | |
# Add the new shell to the list of legit shells | |
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells" | |
# Change the shell for the user | |
chsh -s /usr/local/bin/bash | |
# Restart terminal.app (new window works too) | |
# Check for Bash 4 and /usr/local/bin/bash... | |
echo $BASH && echo $BASH_VERSION | |
# Put this somewhere in your dotfiles to turn on recursive globbing | |
shopt -s globstar | |
# Source your dotfiles... | |
source path/to/dotfiles | |
# Now you can double glob your way into distant directories | |
cd some/uportal/project/root | |
cd **/skins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok! Just created a script that install latest bash on MacOS Mojave 10.14.*
It also creates a uninstall at ~/.bash/bash_uninstall (in case you want to revert changes back)
It takes care of everything and it's working like a charm. :)
Why I did this? Because I preffer to do things manually on my hackintosh...