diff options
author | Daniel Francis <francis@sugarlabs.org> | 2013-01-03 13:52:11 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2013-01-03 13:52:11 (GMT) |
commit | fbe7728c766c8eed8b243f0eadb522f40b0875d3 (patch) | |
tree | 42fba2326f51b06a36617e3a99c9a34eb0ce96fd | |
parent | c9e51b59139bc9b36588b42357d58cfc3c751fb5 (diff) |
Allow to pack files from sugar specific directory
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
-rw-r--r-- | xobuild.py | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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)) |