| 8 | class build_scripts(old_build_scripts): |
| 9 | |
| 10 | def generate_scripts(self, scripts): |
| 11 | new_scripts = [] |
| 12 | func_scripts = [] |
| 13 | for script in scripts: |
| 14 | if is_string(script): |
| 15 | new_scripts.append(script) |
| 16 | else: |
| 17 | func_scripts.append(script) |
| 18 | if not func_scripts: |
| 19 | return new_scripts |
| 20 | |
| 21 | build_dir = self.build_dir |
| 22 | self.mkpath(build_dir) |
| 23 | for func in func_scripts: |
| 24 | script = func(build_dir) |
| 25 | if not script: |
| 26 | continue |
| 27 | if is_string(script): |
| 28 | log.info(" adding '%s' to scripts" % (script,)) |
| 29 | new_scripts.append(script) |
| 30 | else: |
| 31 | [log.info(" adding '%s' to scripts" % (s,)) for s in script] |
| 32 | new_scripts.extend(list(script)) |
| 33 | return new_scripts |
| 34 | |
| 35 | def run (self): |
| 36 | if not self.scripts: |