Created
May 6, 2011 22:21
-
-
Save nbrew/959905 to your computer and use it in GitHub Desktop.
Capture migration file name after script/generate migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "exists db/migrate | |
create db/migrate/20110506220427_add_shared_column_to_resources.rb | |
"| head -n 2 | tail -n 1 | sed -e 's/.*create[[:space:]]*\(db\/migrate\)/\1/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment