| 1 | #!./bin/python |
| 2 | |
| 3 | import pymongo |
| 4 | import sys, os |
| 5 | |
| 6 | print "*** WARNING! ***" |
| 7 | print " Running this will destroy your mediagoblin database," |
| 8 | print " remove all your media files in user_dev/, etc." |
| 9 | |
| 10 | drop_it = raw_input( |
| 11 | 'Are you SURE you want to destroy your environment? (if so, type "yes")> ') |
| 12 | |
| 13 | if not drop_it == 'yes': |
| 14 | sys.exit(1) |
| 15 | |
| 16 | conn = pymongo.Connection() |
| 17 | conn.drop_database('mediagoblin') |
| 18 | |
| 19 | os.popen('rm -rf user_dev/media') |
| 20 | os.popen('rm -rf user_dev/beaker') |
| 21 | |
| 22 | print "removed all your stuff! okay, now re-run ./bin/buildout" |