-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcopy.rb
46 lines (40 loc) · 1.32 KB
/
pcopy.rb
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# typed: false
# frozen_string_literal: true
# This file was generated by a script. DO NOT EDIT!
class Pcopy < Formula
desc "Client to interact with a pcopy temporary file host"
homepage "https://github.com/binwiederhier/pcopy"
url "https://api.github.com/repos/binwiederhier/pcopy/tarball/v0.6.1"
version "0.6.1"
sha256 "09afe2f2fd0c31953e190da3c9bbb847fcc8887dfcc986ab6df9241c857f434f"
license "Apache-2.0"
depends_on "go" => :build
on_macos do
if Hardware::CPU.intel?
def install
ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}"
system "go", "build", *std_go_args(ldflags: ldflags)
end
end
if Hardware::CPU.arm?
def install
ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}"
system "go", "build", *std_go_args(ldflags: ldflags)
end
end
end
on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
def install
ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}"
system "go", "build", *std_go_args(ldflags: ldflags)
end
end
if Hardware::CPU.intel?
def install
ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601}"
system "go", "build", *std_go_args(ldflags: ldflags)
end
end
end
end