aboutsummaryrefslogtreecommitdiffstats
path: root/destroy_environment.py
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2011-05-07 03:11:36 +0200
committerJoar Wandborg <git@wandborg.com>2011-05-07 03:11:36 +0200
commit88bcdcd7d28d8e5548aeefa0a69e8af3773870a9 (patch)
tree0b14edd0dc44691068c631ddfc59ff6c890fc69d /destroy_environment.py
parent5c42a82c5ad4fa410219084a6f43bdc414369114 (diff)
parent1c424df505b3c9f9cceb84a4fd0ac1867b7ed9b4 (diff)
downloadmediagoblin-88bcdcd7d28d8e5548aeefa0a69e8af3773870a9.tar.lz
mediagoblin-88bcdcd7d28d8e5548aeefa0a69e8af3773870a9.tar.xz
mediagoblin-88bcdcd7d28d8e5548aeefa0a69e8af3773870a9.zip
Merge branch 'master' of http://git.gitorious.org/mediagoblin/mediagoblin
Diffstat (limited to 'destroy_environment.py')
-rwxr-xr-xdestroy_environment.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/destroy_environment.py b/destroy_environment.py
new file mode 100755
index 00000000..bbdeffe9
--- /dev/null
+++ b/destroy_environment.py
@@ -0,0 +1,22 @@
+#!./bin/python
+
+import pymongo
+import sys, os
+
+print "*** WARNING! ***"
+print " Running this will destroy your mediagoblin database,"
+print " remove all your media files in user_dev/, etc."
+
+drop_it = raw_input(
+ 'Are you SURE you want to destroy your environment? (if so, type "yes")> ')
+
+if not drop_it == 'yes':
+ sys.exit(1)
+
+conn = pymongo.Connection()
+conn.drop_database('mediagoblin')
+
+os.popen('rm -rf user_dev/media')
+os.popen('rm -rf user_dev/beaker')
+
+print "removed all your stuff! okay, now re-run ./bin/buildout"