Skip to content

Commit

Permalink
Mercurial: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Nov 15, 2011
1 parent 6594f49 commit 7d07a8d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Library/Formula/mercurial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def install
# Skip making the docs; depends on 'docutils' module.
system "make", "PREFIX=#{prefix}", "build"
system "make", "PREFIX=#{prefix}", "install-bin"

# Now we have lib/python2.x/site-packages/ with Mercurial
# libs in them. We want to move these out of site-packages into
# a self-contained folder. Let's choose libexec.
Expand All @@ -27,20 +28,12 @@ def install

libexec.install Dir["#{lib}/python*/site-packages/*"]

# Move "hg" executable to libexec and symlink back to bin
# libexec.install bin+'hg'
# Symlink the hg binary into bin
ln_s libexec+'hg', bin+'hg'

# Move the hg startup script into libexec too, and link it from bin
# bin.mkpath
# libexec.install HOMEBREW_PREFIX+'share/python/hg'
# ln_s libexec+'hg', bin+'hg'

# Remove the hard-coded python invocation from hg
inreplace bin+'hg', %r[#!/.*/python], '#!/usr/bin/env python'

# We now have a self-contained Mercurial install.

# Install some contribs
bin.install 'contrib/hgk'

Expand Down

0 comments on commit 7d07a8d

Please sign in to comment.