From 06ce15eb80ff59e3c253e507c11fbe76dccb15f9 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 17 Jan 2023 03:39:13 -0500 Subject: [PATCH] improve formula (#3) --- Formula/sshpass.rb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Formula/sshpass.rb b/Formula/sshpass.rb index 1f974b2..7e3d8fa 100644 --- a/Formula/sshpass.rb +++ b/Formula/sshpass.rb @@ -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