侧边栏壁纸
博主头像
最闪啊姚凌武!博主等级

天下武功,唯快不破

  • 累计撰写 293 篇文章
  • 累计创建 34 个标签
  • 累计收到 10 条评论

目 录CONTENT

文章目录

Homebrew的使用

姚凌武
2014-12-26 / 0 评论 / 0 点赞 / 11 阅读 / 4757 字
Homebrew installs the stuff you need that Apple didn’t.
$ brew install wget

Homebrew installs packages to their own directory and then symlinks their files into /usr/local.
$ cd /usr/local
$ find Cellar
Cellar/wget/1.15
Cellar/wget/1.15/bin/wget
Cellar/wget/1.15/share/man/man1/wget.1

$ ls -l bin
bin/wget -> ../Cellar/wget/1.15/bin/wget

  • Homebrew won’t install files outside its prefix, and you can place a Homebrew installation wherever you like.
Trivially create your own Homebrew packages.
$ brew create http://foo.com/bar-1.0.tgz
Created /usr/local/Library/Formula/bar.rb

It's all git and ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates
$ brew edit wget # opens in $EDITOR!
Homebrew formulae are simple Ruby scripts:

class Wget < Formula
  homepage "https://www.gnu.org/software/wget/"
  url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
  sha1 "f3c925f19dfe5ed386daae4f339175c108c50574"

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make", "install"
  end
end

  • Homebrew complements OS X. Install your gems with gem, and their dependencies with brew.

    Install Homebrew

     
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"



Paste that at a Terminal prompt.
The script explains what it will do and then pauses before it does it. There are more installation options here (needed on 10.5).     http://brew.sh/
]]>
0
iOS

评论区