必要なやつはHomebrewで入れる

Sphinxを入れるために入れたHomebrewですが予想以上に役に立っています。

wgetやnkfも標準で入っていないMac OS X・・・・
その都度必要になる奴をぽこぽこ入れられる便利なやつ。

nkfを入れるなら下記コマンドでOK

$ brew install nkf
==> Downloading http://dl.sourceforge.jp/nkf/53171/nkf-2.1.2.tar.gz
############################################################### 100.0%
==> Patching
patching file Makefile
==> make
==> make install
/usr/local/Cellar/nkf/2.1.2: 4 files, 224K, built in 11 seconds

30秒かからずに完了。
すげー便利。

今後はこれでインストールしたらOK^^;;
今まで毛嫌いしていたAWSのAPIもコマンド一発で入ります。下記コマンドを入れてみた。
すべて brew install hogehoge で入れられます。

  • s3cmd
  • ec2-api-tools
  • ec2-ami-tools

Updateは下記コマンドでいいらしい
まずは「brew update」

$ brew update
remote: Counting objects: 195, done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 163 (delta 119), reused 90 (delta 51)
Receiving objects: 100% (163/163), 21.18 KiB | 12 KiB/s, done.
Resolving deltas: 100% (119/119), completed with 28 local objects.
From https://github.com/mxcl/homebrew
bcdce50..497a958 master -> origin/master
Updated Homebrew from bcdce506 to 497a958a.
==> New formulae
apt-dater freexl ht urweb
binwalk git-gerrit qscintilla2
==> Removed formulae
autojump
==> Updated formulae
apiextractor geos mercurial spatialite-tools
clamav gnuplot neon ta-lib
cppcheck libffi node tophat
ec2-api-tools* librasterlite pango unison
exiftool libspatialite pyside unixodbc
feh macvim pyside-tools vgmstream
generatorrunner maxima shiboken

Upgradeできるformulaには*がついています。コマンドでの確認は下記の通り

$ brew outdated
ec2-api-tools (1.5.0.1 < 1.5.2.3)

上記場合だとec2-api-toolsがUpgradeできます。
その後「brew upgrade」
これでバージョンアップが完了しました。

今回あげた「ec2-api-tools」の場合だと

$ ls -F /usr/local/Cellar/ec2-api-tools/
1.5.0.1/ 1.5.2.3/

2つのバージョンが入っています。
古いバージョンは使わないので「brew cleanup」コマンドで消します。

$ brew cleanup
Removing /usr/local/Cellar/ec2-api-tools/1.5.0.1…
Removing /usr/local/Cellar/libevent/2.0.14…
Pruned 0 symbolic links and 1 directories from /usr/local

確認したら古いバージョンのディレクトリはきれいに削除済み

$ ls -F /usr/local/Cellar/ec2-api-tools/
1.5.2.3/

これで削除も完了。

かなり便利!!!
Mac OS XはUNIXだというのを改めて感じた。

これ毎回makeするから私のMacBook Air(Late 2010)ではつらい(x_x)
新しいMacBook Airが欲しくなるぅ〜

#cronでbrew updateは回しておくべきなのかなぁ

Mac

Posted by WATARU YONESU