Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2008-05-25 19:52:31 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2008-05-25 19:52:31 (GMT)
commitea18782bea4187270dfe3cddaed5fa26d83e2270 (patch)
tree8b8d4290badf09bcedc027ae35b5c8cb65fb22e2 /src
parent211c5ae1c4a9825d8a4aaca6feb3920bc6ff73ff (diff)
Separate helpers from the commands.
Diffstat (limited to 'src')
-rw-r--r--src/sugar/activity/bundlebuilder.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py
index cea6e20..cd1e77f 100644
--- a/src/sugar/activity/bundlebuilder.py
+++ b/src/sugar/activity/bundlebuilder.py
@@ -92,31 +92,6 @@ class _AllFileList(list):
f != '.gitignore':
self.append(os.path.join(root, f))
-def cmd_help(config, options, args):
- print 'Usage: \n\
-setup.py build - build generated files \n\
-setup.py dev - setup for development \n\
-setup.py dist - create a bundle package \n\
-setup.py install [dirname] - install the bundle \n\
-setup.py uninstall [dirname] - uninstall the bundle \n\
-setup.py genpot - generate the gettext pot file \n\
-setup.py release - do a new release of the bundle \n\
-setup.py help - print this message \n\
-'
-
-def cmd_dev(config, options, args):
- bundle_path = env.get_user_activities_path()
- if not os.path.isdir(bundle_path):
- os.mkdir(bundle_path)
- bundle_path = os.path.join(bundle_path, config.bundle_top_dir)
- try:
- os.symlink(config.source_dir, bundle_path)
- except OSError:
- if os.path.islink(bundle_path):
- print 'ERROR - The bundle has been already setup for development.'
- else:
- print 'ERROR - A bundle with the same name is already installed.'
-
def _get_file_list(manifest):
if os.path.isfile(manifest):
return _ManifestFileList(manifest)
@@ -148,6 +123,31 @@ def _get_l10n_list(config):
return l10n_list
+def cmd_help(config, options, args):
+ print 'Usage: \n\
+setup.py build - build generated files \n\
+setup.py dev - setup for development \n\
+setup.py dist - create a bundle package \n\
+setup.py install [dirname] - install the bundle \n\
+setup.py uninstall [dirname] - uninstall the bundle \n\
+setup.py genpot - generate the gettext pot file \n\
+setup.py release - do a new release of the bundle \n\
+setup.py help - print this message \n\
+'
+
+def cmd_dev(config, options, args):
+ bundle_path = env.get_user_activities_path()
+ if not os.path.isdir(bundle_path):
+ os.mkdir(bundle_path)
+ bundle_path = os.path.join(bundle_path, config.bundle_top_dir)
+ try:
+ os.symlink(config.source_dir, bundle_path)
+ except OSError:
+ if os.path.islink(bundle_path):
+ print 'ERROR - The bundle has been already setup for development.'
+ else:
+ print 'ERROR - A bundle with the same name is already installed.'
+
def cmd_dist(config, options, args):
cmd_build(config, options, args)