platform="$(uname -s)-$(uname -m)"
case $platform in
Linux-x86_64)
  install_package "jruby-head" "https://github.com/ruby/jruby-dev-builder/releases/latest/download/jruby-head-ubuntu-24.04-x64.tar.gz" jruby
  ;;
Linux-aarch64)
  install_package "jruby-head" "https://github.com/ruby/jruby-dev-builder/releases/latest/download/jruby-head-ubuntu-24.04-arm64.tar.gz" jruby
  ;;
Darwin-x86_64)
  install_package "jruby-head" "https://github.com/ruby/jruby-dev-builder/releases/latest/download/jruby-head-darwin-x64.tar.gz" jruby
  ;;
Darwin-arm64)
  install_package "jruby-head" "https://github.com/ruby/jruby-dev-builder/releases/latest/download/jruby-head-darwin-arm64.tar.gz" jruby
  ;;
*)
  colorize 1 "Unsupported platform: $platform"
  return 1
  ;;
esac
