From: MORIOKA Tomohiko Date: Wed, 18 Jul 2012 15:02:39 +0000 (+0900) Subject: (brew_prefix): New variable; use it instead of "/usr/local". X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a0e1ee69ba47c5224a429cb1c505a31a29b349fc;p=chise%2Fchise-base.git (brew_prefix): New variable; use it instead of "/usr/local". - Add code to detect location of homebrew.mxcl.canna.plist. --- diff --git a/bootstrap.homebrew b/bootstrap.homebrew index ea8d7f8..017215e 100755 --- a/bootstrap.homebrew +++ b/bootstrap.homebrew @@ -9,22 +9,26 @@ brew -v install berkeley-db brew -v install xaw3d brew -v install gettext +brew_prefix=`brew --prefix` + if [ -f /Library/LaunchDaemons/homebrew.mxcl.canna.plist ] then sudo launchctl unload -w /Library/LaunchDaemons/homebrew.mxcl.canna.plist fi -if [ -x /usr/local/sbin/cannakill ] +if [ -x ${brew_prefix}/sbin/cannakill ] then - sudo /usr/local/sbin/cannakill + sudo ${brew_prefix}/sbin/cannakill fi -(cd `brew --prefix` ; git pull https://github.com/chise/homebrew/) +(cd ${brew_prefix}; git pull https://github.com/chise/homebrew/) brew -v install canna brew upgrade sudo sh -c "sed 's/rc\.canna/rc.canna-root/' \ - < /usr/local/Cellar/canna/3.7p3_1/homebrew.mxcl.canna.plist \ + < ${brew_prefix}`ls -l ${brew_prefix}/sbin/cannaserver \ + | sed 's/^.*-> ..//' \ + | sed 's|/sbin/cannaserver||'`/homebrew.mxcl.canna.plist \ > /Library/LaunchDaemons/homebrew.mxcl.canna.plist" sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.canna.plist