Skip to content

Instantly share code, notes, and snippets.

@yonchu
Created October 23, 2012 01:26
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 yonchu/3936116 to your computer and use it in GitHub Desktop.
Save yonchu/3936116 to your computer and use it in GitHub Desktop.
MacのHomebrewの詳細情報を表示, Formula指定にて詳細情報表示も可
# 実行イメージ
# homebrewの状態をざっくり表示
$ br
===== brew --config =====
HOMEBREW_VERSION: 0.9.3
HEAD: bdaae65b9af7e5a00c106bdbdb07992b5ad343de
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.2-x86_64
Xcode: 4.5.1
CLT: 4.5.0.0.1.1249367152
LLVM-GCC: build 2336
Clang: 4.1 build 421
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/bin/python2.7
Ruby: /Users/yonchu/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
===== brew --env =====
CC: cc
CXX: c++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin
===== brew info =====
61 kegs, 13233 files, 333M
===== brew list =====
ack freetype lv readline
apachetop gdbm markdown reattach-to-user-namespace
autoconf gettext maven2 rmtrash
automake git multitail rtmpdump
bash git-now ncftp sqlite
bash-completion glib ngrep tig
bdw-gc gnu-getopt nkf tmux
binutils gnu-sed nmap tomcat6
bsdmake grep pango tree
cairo htop-osx pcre w3m
colordiff hub pixman wget
coreutils libevent pkg-config xz
ctags libffi potrace zsh
findutils libpng proctools
fontconfig libspiro pstree
fontforge libtool python
===== brew tap =====
adamv/alt
homebrew/boneyard
homebrew/dupes
homebrew/versions
===== brew doctor =====
Your system is raring to brew.
===== brew outdated =====
cairo (1.12.2, 1.12.4 < 1.12.6)
pixman (0.26.2 < 0.28.0)
# Formula情報の表示
$ br git
===== brew info =====
git: stable 1.8.0, HEAD
http://git-scm.com
/usr/local/Cellar/git/1.7.12.3 (1242 files, 24M)
/usr/local/Cellar/git/1.8.0 (1250 files, 24M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/git.rb
==> Options
--with-blk-sha1
Compile with the block-optimized SHA1 implementation
--with-pcre
Compile with the PCRE library
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
The 'contrib' directory has been installed to:
/usr/local/share/git-core/contrib
===== brew options =====
--with-pcre
Compile with the PCRE library
--with-blk-sha1
Compile with the block-optimized SHA1 implementation
# Formulaの検索
$ br gre
===== brew info =====
Error: No available formula for gre
===== brew search =====
aggregate bgrep grep mongrel2 pdfgrep postgresql postgresql9 sgrep
agrep gremlin grepcidr ngrep pngrewrite postgresql8 psgrep pgrep
josegonzalez/php/php53-uploadprogress josegonzalez/php/php54-uploadprogress
homebrew/science/xmgredit
#!/bin/sh
#
# 引数なし
# - homebrewの情報を色々表示
#
# 第1引数:
# - Formula名指定でFormulaの詳細情報を表示
# - マッチするFormulaがない場合は検索
#
if ! type brew >/dev/null 2>&1; then
echo 'Error: Homebrew is not installed' 1>&2
exit 1
fi
if [ $# -eq 0 ]; then
echo "===== brew --config ====="
brew --config
echo
echo "===== brew --env ====="
brew --env
echo
echo "===== brew info ====="
brew info
echo
echo "===== brew list ====="
brew list
echo
echo "===== brew tap ====="
brew tap
echo
echo "===== brew doctor ====="
brew doctor
echo
echo "===== brew outdated ====="
brew outdated
else
echo "===== brew info ====="
brew info "$1"
if [ $? -eq 0 ]; then
echo
echo "===== brew options ====="
brew options "$1"
else
echo
echo "===== brew search ====="
brew search "$1"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment