Skip to content

Commit

Permalink
Added support for Apple Silicon Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
missingcharacter committed Jan 28, 2025
1 parent 281a9ec commit f7f3e1c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
8 changes: 6 additions & 2 deletions MacOS/bash_profile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
eval "$(/usr/local/bin/brew shellenv)"
if [[ "$(uname -m)" == 'arm64' ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
else
eval "$(/usr/local/bin/brew shellenv)"
fi
# Homebrew's Bash completion stuff
if [ -f "$(brew --prefix)"/etc/bash_completion ]; then
# shellcheck disable=SC1091
source "$(brew --prefix)"/etc/bash_completion
fi

# Update PATH
export PATH="/usr/local/opt/curl/bin:${PATH}:${HOME}/src/gopath/bin:${HOME}/bin"
export PATH="$(brew --prefix)/opt/curl/bin:${PATH}:${HOME}/src/gopath/bin:${HOME}/bin"

# Source: https://iterm2.com/documentation-shell-integration.html
# shellcheck disable=SC1091
Expand Down
5 changes: 1 addition & 4 deletions MacOS/post-install
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@ function are_brew_basics_installed() {
function are_cask_basics_installed() {
declare -a BREW_CASK_BASICS=('1password'
'alfred'
'firefox'
'browserosaurus'
'flameshot'
'font-hack-nerd-font'
'font-jetbrains-mono'
'google-chrome'
'iterm2'
'jdownloader'
'macdown'
'pinta'
'private-internet-access'
'proxyman'
'rectangle'
'slack'
'sublime-text'
'tidal'
'transmission'
Expand Down
6 changes: 5 additions & 1 deletion lib/utils
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ function get_brew_location() {
echo -n '/home/linuxbrew/.linuxbrew/bin/brew'
;;
MacOS)
echo -n '/usr/local/bin/brew'
if [[ "$(uname -m)" == 'arm64' ]]; then
echo -n '/opt/homebrew/bin/brew'
else
echo -n '/usr/local/bin/brew'
fi
;;
esac
}
Expand Down
3 changes: 3 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ declare -a CONFIG_FOLDERS=(
'ghostty'
'nvim'
)
if [[ ! -e "${HOME}/.config" ]]; then
mkdir "${HOME}/.config"
fi
for CONFIG_FOLDER in "${CONFIG_FOLDERS[@]}"; do
link_if_not_exists "${GITROOT}/${CONFIG_FOLDER}" "${HOME}/.config/${CONFIG_FOLDER}"
done
Expand Down
2 changes: 1 addition & 1 deletion tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Programming languages
dotnet-core 8.0.100
java adoptopenjdk-8.0.252+9.1
java temurin-21.0.6+7.0.LTS
golang 1.22.0
groovy 2.4.12
lua 5.4.6
Expand Down

0 comments on commit f7f3e1c

Please sign in to comment.