Permalink
Browse files

added 'clean' command to manage.py

  • Loading branch information...
1 parent b987fe6 commit 5b3e5869bea4848283d46d484af7f74049de461c @toolness committed Oct 9, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 manage.py
View
@@ -4,7 +4,8 @@
commands:
runserver - run web server on 127.0.0.1 port %(port)s
- build - build all content
+ build - build all generated content
+ clean - remove all generated content
"""
from wsgiref.simple_server import make_server
@@ -128,6 +129,12 @@ def serve(ip=''):
serve('127.0.0.1')
elif cmd == 'build':
build()
+ elif cmd == 'clean':
+ for filename in [jsonpath, oggpath]:
+ if os.path.exists(filename):
+ print "removing %s" % filename
+ os.remove(filename)
+ print "done cleaning."
else:
print "unknown command: %s" % cmd
sys.exit(1)

0 comments on commit 5b3e586

Please sign in to comment.