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
printfn 2022-06-15 14:02:53 +02:00 committed by BrewTestBot
parent 05c4f1a4ea
commit 63c3254122
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 25 additions and 0 deletions

25
Formula/flock.rb Normal file
View File

@ -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