Restore the sugar script so we can run from installation too

This commit is contained in:
Marco Pesenti Gritti 2006-04-27 15:23:11 -04:00
parent dce4a8c13c
commit 07434a4834
2 changed files with 30 additions and 0 deletions

View File

@ -1,5 +1,7 @@
SUBDIRS = chat browser shell
bin_SCRIPTS = sugar
sugardir = $(pythondir)/sugar
sugar_PYTHON = \
__init__.py \

28
sugar Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/python
import sys
import os
if len(sys.argv) == 1:
# FIXME Start a session
# We are lucky and this
# currently behave as we want.
# The chat depends on the
# web browser, so both activities
# are spanned. But obviously we
# need something better.
import sugar.chat
sugar.chat.main()
elif sys.argv[1] == 'shell':
import sugar.shell
sugar.shell.main()
elif sys.argv[1] == 'chat':
import sugar.chat
sugar.chat.main()
elif sys.argv[1] == 'browser':
import sugar.browser
sugar.browser.main()
else:
print "Unkown activity"