changeset 9144:025448743177

mx: generate services files from provider descriptions
author Roland Schatz <roland.schatz@oracle.com>
date Tue, 16 Apr 2013 15:27:17 +0200
parents 79432a8f1ff8
children 57f85e39c75f
files mxtool/mx.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Tue Apr 16 15:27:09 2013 +0200
+++ b/mxtool/mx.py	Tue Apr 16 15:27:17 2013 +0200
@@ -1684,6 +1684,12 @@
                                     with open(join(root, f), 'r') as infile:
                                         for line in infile:
                                             outfile.write(line)
+                        elif relpath == join('META-INF', 'providers'):
+                            for f in files:
+                                with open(join(root, f), 'r') as infile:
+                                    for line in infile:
+                                        with open(join(services, line.strip()), 'a') as outfile:
+                                            outfile.write(f + '\n')
                         else:
                             for f in files:
                                 arcname = join(relpath, f).replace(os.sep, '/')