Skip to content

Commit

Permalink
improve formula (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrui333 authored Jan 17, 2023
1 parent 7fe2c53 commit 06ce15e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Formula/sshpass.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
require 'formula'

class Sshpass < Formula
desc "Non-interactive ssh password auth Files"
homepage "https://sourceforge.net/projects/sshpass/"
url "https://downloads.sourceforge.net/project/sshpass/sshpass/1.09/sshpass-1.09.tar.gz"
sha256 "71746e5e057ffe9b00b44ac40453bf47091930cba96bbea8dc48717dedc49fb7"
homepage 'https://sourceforge.net/projects/sshpass'

depends_on 'gnu-sed'
license "GPL-2.0-or-later"

def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
system "./configure", *std_configure_args, "--disable-silent-rules"
system "make", "install"
end

def test
system "sshpass"
test do
assert_match "ssh: Could not resolve hostname host: nodename nor servname provided, or not known",
shell_output("#{bin}/sshpass -p mypassword ssh username@host touch foo 2>&1", 255)

assert_match "sshpass #{version}", shell_output("#{bin}/sshpass -V")
end
end

0 comments on commit 06ce15e

Please sign in to comment.