#!/bin/bash declare -x RUBYLIB="/usr/local/lib/ruby/site_ruby/1.9.2" declare -x GEM_HOME="/usr/local/lib/ruby/gems/1.9.2" declare -x RAILS_ENV="production" dir=/var/web/mo if [[ !(-d $dir) ]]; then dir=. fi if [[ $2 == '-v' ]]; then echo Running $dir/script/$* fi cd $dir $dir/script/$* 2>&1 | grep -v "29: warning: nested"