| Conditions | 6 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ Fuse real (not symlinks to) libraries with same name |
||
| 20 | def main(): |
||
| 21 | try: |
||
| 22 | lib_dir_out, lib_dir_in1, lib_dir_in2 = sys.argv[1:] |
||
| 23 | except (IndexError, ValueError): |
||
| 24 | print(USAGE) |
||
| 25 | sys.exit(-1) |
||
| 26 | for fname in os.listdir(lib_dir_in1): |
||
| 27 | if not splitext(fname)[1] in LIB_EXTS: |
||
| 28 | continue |
||
| 29 | lib_path = pjoin(lib_dir_in1, fname) |
||
| 30 | out_path = pjoin(lib_dir_out, fname) |
||
| 31 | if islink(lib_path): |
||
| 32 | continue |
||
| 33 | lib_path_2 = pjoin(lib_dir_in2, fname) |
||
| 34 | if not isfile(lib_path_2): |
||
| 35 | continue |
||
| 36 | # Fuse and copy library |
||
| 37 | check_call(['lipo', '-create', lib_path, lib_path_2, |
||
| 38 | '-output', out_path]) |
||
| 39 | |||
| 43 |