/
rcm.rb
44 lines (40 loc) 路 2.11 KB
/
rcm.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
class Rcm < Formula
desc "RC file (dotfile) management"
homepage "https://thoughtbot.github.io/rcm/rcm.7.html"
url "https://thoughtbot.github.io/rcm/dist/rcm-1.3.6.tar.gz"
sha256 "f4fdfbc451d1fb5764531290a202a0a871f6b81ba3c01a6b76c49435c85080a5"
license "BSD-3-Clause"
# The first-party website doesn't appear to provide links to archive files, so
# we check the Git repository tags instead.
livecheck do
url "https://github.com/thoughtbot/rcm.git"
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b5aa9414359e08d20bee9c048616d9d7e0dca08491423378b6aec8e570ce674"
sha256 cellar: :any_skip_relocation, arm64_ventura: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, arm64_monterey: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, sonoma: "7b5aa9414359e08d20bee9c048616d9d7e0dca08491423378b6aec8e570ce674"
sha256 cellar: :any_skip_relocation, ventura: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, monterey: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, big_sur: "71cd9064bce03baa3db0f2cf099d4e103d910508ef14306a32b0f75877a5c2b0"
sha256 cellar: :any_skip_relocation, x86_64_linux: "005d4a522f959bc42ac42573cce793a33a6cf5742f34405efd1c7025370f347e"
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/".dotfiles").mkdir
(testpath/".gitconfig").write <<~EOS
[user]
name = Test User
email = test@test.com
EOS
assert_match(/(Moving|Linking)\.\.\./x, shell_output("#{bin}/mkrc -v ~/.gitconfig"))
end
end