Skip to content

Commit

Permalink
Allow installation on non-Intel CPUs with MacOS, and improve error me…
Browse files Browse the repository at this point in the history
…ssage for unsupported environments
  • Loading branch information
C0urante authored and gunnarmorling committed Dec 10, 2022
1 parent 1ea255b commit 6a72560
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Formula/kcctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ class Kcctl < Formula
if OS.linux? && Hardware::CPU.intel?
url "https://github.com/kcctl/kcctl/releases/download/v1.0.0.Alpha5/kcctl-1.0.0.Alpha5-linux-x86_64.zip"
sha256 "669006978af4599da25221fbeaabf6cd956061238a3a1ab452435f0b574d16a8"
end
if OS.mac? && Hardware::CPU.intel?
elsif OS.mac?
# TODO: Check for Rosetta if not running on an Intel CPU?
url "https://github.com/kcctl/kcctl/releases/download/v1.0.0.Alpha5/kcctl-1.0.0.Alpha5-osx-x86_64.zip"
sha256 "562e59dd6890567492eb4f43a2dc64c45caf78d7f7794039a1a179c0e7af9fbb"
else
raise RuntimeError.new("kcctl is only supported on Linux (with Intel CPU) or MacOS")
end


def install
libexec.install Dir["*"]
bin.install_symlink "#{libexec}/bin/kcctl"
Expand Down

0 comments on commit 6a72560

Please sign in to comment.