#! /usr/bin/env python

from grace.management import execute_new, port_grace
import sys

if 'new' in sys.argv and len(sys.argv) == 2:
    execute_new()
    sys.exit()

if 'port' in sys.argv and len(sys.argv) == 2:
    port_grace()
    sys.exit()

if 'help' in sys.argv and len(sys.argv) == 2:
    print 'Grace'
    print '=====\n'
    print 'Grace can be called with either "new" or "port". If you are using a version older than 1.0, please call port first. This will than move the manage.py file in your old grace folder.'
    print 'If you are unsure, call "grace port". The file will be overwritten, but your project will not be touched.\n'
    print 'For further information please visit http://www.github.com/mdiener/grace'
    sys.exit()

print 'Use grace with the "new" option to start a new project.\nTo port from an older version, call "grace port" and than use the provided manage.py file.\nFor further help type "grace help".'
sys.exit()
