#!/usr/bin/env python
from flask.ext.script import Manager
try:
    from blag.app import create_app
except ImportError:
    import sys
    import os
    sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
    from blag.app import create_app


manager = Manager(create_app)

@manager.command
def freeze():
    'Create a frozen copy of this blag'
    from flask.ext.frozen import Freezer
    freezer = Freezer(create_app())
    freezer.freeze()

if __name__ == '__main__':
    manager.run()
