Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Copyright (C) 2016 jeremy.rosen@smile.fr
- TEMPLATE_FILES ??=""
- python template_do_template() {
- template_list = d.getVar('TEMPLATE_FILES', True).split()
- for template in template_list:
- local = template
- bb.note("Applying template '%s'" % (template))
- try:
- with open(template, 'r') as f:
- body = f.read()
- except (IOError, OSError) as exc:
- bb.fatal(str(exc))
- expanded_body = d.expand(body)
- bb.warn("\n%s\n\n%s" %(body,expanded_body))
- try:
- with open(template, 'w') as f:
- f.write(expanded_body)
- except (IOError, OSError) as exc:
- bb.fatal(str(exc))
- }
- addtask template after do_patch before do_build
- do_template[dirs] = "${WORKDIR}"
- EXPORT_FUNCTIONS do_template
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement