blob: a034135844c914463d4143707082fdcd91ad8c15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/env python
import sys
import fileinput
from sugar.bundle.activitybundle import ActivityBundle
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
def cmd_help():
print 'Usage: sugar-install-bundle [ bundlename ] \n\n\
Install an activity bundle (.xo). \n'
if len(sys.argv) != 2:
cmd_help()
sys.exit(2)
for line in fileinput.input():
if line:
bundle = ActivityBundle(line)
bundle.install()
print "%s: '%s' installed." % (sys.argv[0], line)
|