unxip 1.1.3 (new formula)

Closes #115129.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Timothy Sutton 2022-12-04 20:55:14 -05:00 committed by BrewTestBot
parent 11887ccd6d
commit 060a7a91e7
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 28 additions and 0 deletions

28
Formula/unxip.rb Normal file
View File

@ -0,0 +1,28 @@
class Unxip < Formula
desc "Fast Xcode unarchiver"
homepage "https://github.com/saagarjha/unxip"
url "https://github.com/saagarjha/unxip.git", tag: "v1.1.3", revision: "b3ce1ab4728d4173390c97eddd28e821ad9e2974"
license "LGPL-3.0-only"
head "https://github.com/saagarjha/unxip.git", branch: "main"
depends_on xcode: :build
depends_on :macos
depends_on macos: :monterey
uses_from_macos "swift"
def install
system "swift", "build", "--disable-sandbox", "-c", "release"
bin.install ".build/release/unxip"
end
test do
assert_equal "unxip #{version}", shell_output("#{bin}/unxip --version").strip
# Create a sample xar archive just to satisfy a .xip header, then test
# the failure case of expanding to a non-existent directory
touch "foo.txt"
system "xar", "-c", "-f", "foo.xip", "foo.txt"
assert_match %r{^Failed to access output directory at /not/a/real/dir.*$},
shell_output("2>&1 #{bin}/unxip foo.xip /not/a/real/dir", 1)
end
end