Skip to content

Instantly share code, notes, and snippets.

@BH1SCW
Forked from snixon/mosh-agent-forwarding-ng.rb
Created August 21, 2021 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BH1SCW/3c3f84ea07dfaeebd1144b3748da30e1 to your computer and use it in GitHub Desktop.
Save BH1SCW/3c3f84ea07dfaeebd1144b3748da30e1 to your computer and use it in GitHub Desktop.
Homebrew Formula: mosh with agent forwarding
require "formula"
class MobileShell < Formula
desc "Remote terminal application"
homepage "https://mosh.mit.edu/"
url "https://mosh.mit.edu/mosh-1.2.5.tar.gz"
sha256 "1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3"
bottle do
sha256 "046b0c48cd1c573d57500e683122e3152a00556ad960938c6caa962b0c2ef460" => :el_capitan
sha256 "33719bc3df39cf2fdeb4589129f164f3500d2eac1e874666c747b612384545cf" => :yosemite
sha256 "9460c06ccef476ef1b3feed85168ea989ef4eced753cbd59ed53fd512f5c1aff" => :mavericks
sha256 "5a244c07094d5d3d30a95888a7bb0df6051fd81cfec7fd35ac861090f1897d6e" => :mountain_lion
end
head do
url "https://github.com/rinne/mosh.git", :branch => "ssh-agent-forwarding-ng"
depends_on "autoconf" => :build
depends_on "automake" => :build
end
option "without-check", "Run build-time tests"
depends_on "pkg-config" => :build
depends_on "openssl"
depends_on "protobuf"
def install
# teach mosh to locate mosh-client without referring
# PATH to support launching outside shell e.g. via launcher
inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client"
# Upstream prefers O2:
# https://github.com/keithw/mosh/blob/master/README.md
ENV.O2
system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}", "--enable-completion"
system "make", "check" if build.with?("check") || build.bottle?
system "make", "install"
end
test do
ENV["TERM"] = "xterm"
system "#{bin}/mosh-client", "-c"
end
end
@BH1SCW
Copy link
Author

BH1SCW commented Aug 21, 2021

Error: mosh-agent-forwarding-ng: Calling sha256 "digest" => :tag in a bottle block is disabled! Use brew style --fix on the formula to update the style or use sha256 tag: "digest" instead.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mosh-agent-forwarding-ng.rb:10

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment