[elbe-devel] [PATCH v2 20/24] elbeproject/sdk: create env-setup file

Manuel Traut manut at linutronix.de
Thu Feb 8 14:17:06 CET 2018


instead of writing a dummy file, create a env-setup file based
on the mako template

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/elbeproject.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 5dccd24f..cac3d88f 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -276,8 +276,12 @@ class ElbeProject (object):
         with open(os.path.join(self.builddir, 'setup-sdk.sh'), 'w') as f:
             f.write(template(t, sdkvalues))
 
+        t = os.path.join(mako_template_dir, 'environment-setup-elbe.mako')
+        with open(os.path.join(self.sdkpath,
+                               'environment-setup-elbe'), 'w') as f:
+            f.write(template(t, sdkvalues))
+
         # create sdk tar and append it to setup script
-        self.log.do("cd %s; touch environment-setup-elbe" % self.sdkpath)
         self.log.do("cd %s; tar cJf ../sdk.txz ." % self.sdkpath)
         self.log.do("cd %s; cat sdk.txz >> setup-sdk.sh" % self.builddir)
         self.log.do("cd %s; chmod +x setup-sdk.sh" % self.builddir)
-- 
2.15.1




More information about the elbe-devel mailing list