Files
runner-images/images/macos/scripts/build/configure-shell.sh
T

20 lines
660 B
Bash
Raw Normal View History

#!/bin/bash -e -o pipefail
2023-11-28 02:25:03 +01:00
################################################################################
## File: configure-shell.sh
## Desc: Configure shell to use bash
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
2020-09-10 14:34:08 +03:00
echo "Changing shell to bash"
sudo chsh -s /bin/bash $USERNAME
sudo chsh -s /bin/bash root
# Check MacOS architecture and add HOMEBREW PATH to bashrc
if [[ $arch == "arm64" ]]; then
echo "Adding Homebrew environment to bash"
# Discussed here: https://github.com/Homebrew/brew/pull/18366
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bashrc
2023-11-28 02:25:03 +01:00
fi