Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'formula'
class HtopOsx < Formula
homepage ''
url ''
sha1 '9f550599c60c16630b4211fc6820bf34f3e79d77'
version ''
depends_on :autoconf
depends_on :automake
depends_on :libtool
def install
# Otherwise htop will segfault when resizing the terminal
ENV.no_optimization if ENV.compiler == :clang
(buildpath/'m4').mkpath # or autogen fails
system "./"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install", "DEFAULT_INCLUDES='-iquote .'"
def caveats; <<-EOS.undent
htop-osx requires root privileges to correctly display all running processes.
You can either run the program via `sudo` or set the setuid bit:
sudo chown root:wheel #{bin}/htop
sudo chmod u+s #{bin}/htop
You should be certain that you trust any software you grant root privileges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment