flock 0.4.0 (new formula)
Closes #103683. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: Rui Chen <rui@chenrui.dev> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
05c4f1a4ea
commit
63c3254122
|
@ -0,0 +1,25 @@
|
|||
class Flock < Formula
|
||||
desc "Lock file during command"
|
||||
homepage "https://github.com/discoteq/flock"
|
||||
url "https://github.com/discoteq/flock/releases/download/v0.4.0/flock-0.4.0.tar.xz"
|
||||
sha256 "01bbd497d168e9b7306f06794c57602da0f61ebd463a3210d63c1d8a0513c5cc"
|
||||
license "ISC"
|
||||
|
||||
def install
|
||||
system "./configure", *std_configure_args,
|
||||
"--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-silent-rules"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
pid = fork do
|
||||
exec bin/"flock", "tmpfile", "sleep", "5"
|
||||
end
|
||||
sleep 1
|
||||
assert shell_output("#{bin}/flock --nonblock tmpfile true", 1).empty?
|
||||
ensure
|
||||
Process.wait pid
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue