Skip to content

Instantly share code, notes, and snippets.

@dwf
Created May 25, 2015 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwf/26a13e03009068b4299a to your computer and use it in GitHub Desktop.
Save dwf/26a13e03009068b4299a to your computer and use it in GitHub Desktop.
Homebrew formula for a version of mosh with xterm mouse reporting fixed (i.e. works more than once per tmux session)
class MobileShellMousefix < Formula
homepage "http://mosh.mit.edu/"
revision 2
head do
url "https://github.com/lpkruger/mosh.git", :revision => "d5f75ec54a"
depends_on "autoconf" => :build
depends_on "automake" => :build
end
option "with-check", "Run build-time tests"
depends_on "openssl"
depends_on "pkg-config" => :build
depends_on "protobuf"
def install
system "./autogen.sh" if build.head?
# teach mosh to locate mosh-client without referring
# PATH to support launching outside shell e.g. via launcher
inreplace "scripts/mosh", "'mosh-client", "\'#{bin}/mosh-client"
# Upstream prefers O2:
# https://github.com/keithw/mosh/blob/master/README.md
ENV.O2
system "./configure", "--prefix=#{prefix}", "--enable-completion"
system "make", "check" if build.with? "check"
system "make", "install"
end
test do
ENV["TERM"]="xterm"
system "#{bin}/mosh-client", "-c"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment