Skip to content

Instantly share code, notes, and snippets.

@istro
Created December 1, 2012 11:26
Show Gist options
  • Save istro/4181593 to your computer and use it in GitHub Desktop.
Save istro/4181593 to your computer and use it in GitHub Desktop.
gpt
gemf_a=`md5 Gemfile`
mig_a=`ls -l ./db/migrate | wc -l`
git pull tapjoy master
gemf_b=`md5 Gemfile`
mig_b=`ls -l ./db/migrate | wc -l`
if [ $mig_a -eq $mig_b ]; then
echo '...your db seems up to date'
fi
if [ "$gemf_a" = "$gemf_b" ]; then
echo '... and bundle is up to date too.'
else
bundle
fi
if [ $mig_a -gt $mig_b ]; then
osascript -e 'tell app "Terminal" to display dialog "Ye better rake db:migrate!" buttons "OK" default button 1'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment