Skip to content

Instantly share code, notes, and snippets.

@alpaca-tc
Created June 10, 2013 07:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alpaca-tc/5747045 to your computer and use it in GitHub Desktop.
# configure
lang8=$LANG8_HOME
ruby_version=$RUBY_VERSION
# functions#{{{
evaluate() {
echo $1
eval $1
}
homebrew () {
if [ `brew --prefix ${1}` ]; then
echo "Installed: ${1}"
else
brew install ${1}
fi
}
#}}}
# install programs
homebrew "memcached"
homebrew "mysql"
homebrew "redis"
homebrew "mecab"
homebrew "mecab-ipadic"
homebrew "imagemagick"
homebrew "pkg-config"
homebrew "libtool"
evaluate "brew link libtool --force"
evaluate "cd ${lang8}"
evaluate "rbenv local ${ruby_version}"
# copy/paste files
evaluate "cp config/database.yml.example config/database.yml"
evaluate "cp config/config.yml.example config/config.yml"
evaluate "cp config/resque.yml.example config/resque.yml"
evaluate "cp config/seed_fu.yml.example config/seed_fu.yml"
evaluate "cd vendor/plugins/PayPalSDK/lib/; cp config/paypal.rb.example config/paypal.rb"
# initialize database
evaluate "cd ${lang8}"
evaluate "rake db:reset_all"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment