ohmybuck

M1 Script workarounds

October 29, 2021

if [[ `sysctl -n machdep.cpu.brand_string` == 'Apple M1' ]]; then
  # Mac M1's different arch workaround.
  NODE_VERSION=$(perl -lne 'print $1 if /^nodejs ([0-9.]*)$/im' .tool-versions)
  arch -x86_64 asdf install nodejs $NODE_VERSION
fi

Written by Oliver Smit. I love talking about web technologies, good design practices, optimising productivity, and rapid prototyping of projects. Check out my work on Github