2020-10-23 17:59:08 +03:00
|
|
|
#!/bin/bash -e -o pipefail
|
2023-11-28 02:25:03 +01:00
|
|
|
################################################################################
|
|
|
|
|
## File: configure-shell.sh
|
|
|
|
|
## Desc: Configure shell to use bash
|
|
|
|
|
################################################################################
|
2020-10-23 17:59:08 +03:00
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
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
|
2023-05-12 13:30:13 +02:00
|
|
|
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"
|
2024-09-27 01:02:50 +02:00
|
|
|
# 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
|