mosh: update formula for now-generated scripts/mosh

Mosh used to have its startup script at scripts/mosh.  We now edit in
build information, so it's been moved to scripts/mosh.pl and the
Makefile generates scripts/mosh with the appropriate edits.  Homebrew
does its own edits before the build, so tell it about this.  Once
1.2.5 is released, the formula can lose the conditionals again.

Closes Homebrew/homebrew#40338.

Closes Homebrew/homebrew#40339.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
master
John Hood 2015-06-02 23:36:41 -04:00 committed by Tim D. Smith
parent 5f20dcd6f1
commit b62503e227
1 changed files with 7 additions and 2 deletions

View File

@ -24,8 +24,13 @@ class MobileShell < Formula
# 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"
#
# In HEAD, mosh is generated from mosh.pl, This will be in 1.2.5, coming soon.
if build.head?
inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client"
else
inreplace "scripts/mosh", "'mosh-client", "\'#{bin}/mosh-client"
end
# Upstream prefers O2:
# https://github.com/keithw/mosh/blob/master/README.md
ENV.O2