Skip to content

Commit 293a60f

Browse files
committed
Add Homebrew formula for Cpw, a file watcher that copies changed files to a destination
1 parent bed052f commit 293a60f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Formula/cpw.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
class Cpw < Formula
2+
desc "File watcher that copies changed files to a destination"
3+
homepage "https://github.com/mxvsh/cpw"
4+
version "VERSION_PLACEHOLDER"
5+
6+
on_macos do
7+
if Hardware::CPU.arm?
8+
url "https://github.com/mxvsh/cpw/releases/download/vVERSION_PLACEHOLDER/cpw-darwin-arm64"
9+
sha256 "SHA256_PLACEHOLDER_DARWIN_ARM64"
10+
end
11+
end
12+
13+
on_linux do
14+
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
15+
url "https://github.com/mxvsh/cpw/releases/download/vVERSION_PLACEHOLDER/cpw-linux-arm64"
16+
sha256 "SHA256_PLACEHOLDER_LINUX_ARM64"
17+
end
18+
if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
19+
url "https://github.com/mxvsh/cpw/releases/download/vVERSION_PLACEHOLDER/cpw-linux-armv7"
20+
sha256 "SHA256_PLACEHOLDER_LINUX_ARM"
21+
end
22+
end
23+
24+
def install
25+
bin.install Dir["cpw-*"].first => "cpw"
26+
end
27+
28+
test do
29+
system "#{bin}/cpw", "-version"
30+
end
31+
end

0 commit comments

Comments
 (0)