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