Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity/bundlebuilder.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-03-18 12:48:34 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-03-18 12:48:34 (GMT)
commit154a0e91ffece83fd1e7ef836c6faaa83166e93c (patch)
tree8c9ccfd4326cd646352f29a9389c3d3ebd401d49 /sugar/activity/bundlebuilder.py
parent3fd29884f952ea96fcc003b9611c83612759a64b (diff)
Create ~/Activities only when necessary
Diffstat (limited to 'sugar/activity/bundlebuilder.py')
-rw-r--r--sugar/activity/bundlebuilder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sugar/activity/bundlebuilder.py b/sugar/activity/bundlebuilder.py
index 120e7b8..be1d200 100644
--- a/sugar/activity/bundlebuilder.py
+++ b/sugar/activity/bundlebuilder.py
@@ -92,9 +92,6 @@ def _get_bundle_dir():
def _get_install_dir(prefix):
return os.path.join(prefix, 'share/activities')
-def _get_bundle_path():
- return os.path.join(env.get_user_activities_path(), _get_bundle_dir())
-
def _get_package_name():
bundle = Bundle(_get_source_path())
zipname = '%s-%d.xo' % (bundle.get_name(), bundle.get_activity_version())
@@ -120,7 +117,10 @@ setup.py help - print this message \n\
'
def cmd_dev():
- bundle_path = os.path.join(env.get_user_activities_path(), _get_bundle_dir())
+ 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, _get_bundle_dir())
try:
os.symlink(_get_source_path(), bundle_path)
except OSError: