Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2013-01-03 13:52:11 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2013-01-03 13:52:11 (GMT)
commitfbe7728c766c8eed8b243f0eadb522f40b0875d3 (patch)
tree42fba2326f51b06a36617e3a99c9a34eb0ce96fd
parentc9e51b59139bc9b36588b42357d58cfc3c751fb5 (diff)
Allow to pack files from sugar specific directory
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
-rw-r--r--xobuild.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/xobuild.py b/xobuild.py
index a861070..c92eca8 100644
--- a/xobuild.py
+++ b/xobuild.py
@@ -42,7 +42,8 @@ ignore_ends = ['.pyc',
'~',
'.git',
'.gitignore',
- '.gitmodules']
+ '.gitmodules',
+ '.xo']
ignores = ['makescripts',
'dist'
'Makefile',
@@ -80,7 +81,19 @@ def packdir(path, newpath=None):
new_filepath = os.path.join(filepath, name)
new_filename = new_filepath[2:]
if validate(new_filename):
- packdir(new_filepath, os.path.join(newpath, name))
+ if os.path.isfile(new_filepath):
+ new_path = list(os.path.split(
+ new_filename))
+ if newpath:
+ global new_path
+ if newpath != '.':
+ new_path[0] = newpath
+ manifest.append((new_filepath,
+ '/'.join(new_path)))
+ print '%s listed to pack' % filename
+ else:
+ packdir(new_filepath,
+ os.path.join(newpath, name))
else:
if newpath:
packdir(filepath, os.path.join(newpath, filename))