[Mac] Macにsshpassをインストールする

Macにsshpassをインストールしようと思いHomebrewを使ってみたところ、

$ brew install sshpass

Error: No available formula for sshpass

We won’t add sshpass because it makes it too easy for novice SSH users to

ruin SSH’s security.

セキュリティーに問題があるので、やめとけと言われます。

とはいえ、sshpassを必要するソフトウェアはあるので、誰かが公開してくれたFormulaを利用させてもらいます。

$ brew install http://git.io/sshpass.rb

以上です。
ちなみにファイルに中身は、

require ‘formula’
class Sshpass < Formula
  url ‘http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz’
  homepage ‘http://sourceforge.net/projects/sshpass’
  sha256 ‘c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e’
  def install
    system “./configure”, “–disable-debug”, “–disable-dependency-tracking”,
    “–prefix=#{prefix}”
    system “make install”
  end

  def test
    system “sshpass”
  end
end

と単純なので、自分DL & ./configure & make installしてもOKですが、brewを使った方が管理しやすいので利用しました。