Skip to content

Commit

Permalink
added 'clean' command to manage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Oct 9, 2011
1 parent b987fe6 commit 5b3e586
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manage.py
Expand Up @@ -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
Expand Down Expand Up @@ -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.