Swadhin Biswas feat: add temperature detection and Homebrew formula · 3/7/2026
320ac67
29 lines · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require "language/node"

class Fetchx < Formula
  desc "A blazing-fast, feature-rich system information tool written in Rust"
  homepage "https://github.com/swadhinbiswas/fetchx"
  license "MIT"
  version "0.2.0"

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/swadhinbiswas/fetchx/releases/download/v#{version}/fetchx-#{version}-aarch64-apple-darwin.tar.gz"
      sha256 "REPLACE_WITH_ACTUAL_SHA256_aarch64"
    end

    if Hardware::CPU.intel?
      url "https://github.com/swadhinbiswas/fetchx/releases/download/v#{version}/fetchx-#{version}-x86_64-apple-darwin.tar.gz"
      sha256 "REPLACE_WITH_ACTUAL_SHA256_x86_64"
    end
  end

  def install
    bin.install "fetchx"
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/fetchx --version")
  end
end