| Conditions | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from SCons.Script import * |
||
| 5 | def patch(target, source, env): |
||
| 6 | ''' |
||
| 7 | The first file in the source list is the patch file, |
||
| 8 | then comes the file to be patched. |
||
| 9 | The target argument contains the file to be created. |
||
| 10 | ''' |
||
| 11 | patch_file = str(source[0]) |
||
| 12 | assert(patch_file.endswith('.patch')) |
||
| 13 | orig_file = str(source[1]) |
||
| 14 | target_file = str(target[0]) |
||
| 15 | print "Patching third party code ..." |
||
| 16 | os.system("patch -o %s %s %s" % (target_file, orig_file, patch_file)) |
||
| 17 | |||
| 20 |