Save templates as directories with plugin state, if
[ardour.git] / templates / wscript
index 7d01a73bb8b0ad19f577c3657ed65bc5872a9d0c..3f00b785ae7ab2c020a9dacdbca8b5ae48982943 100644 (file)
@@ -22,9 +22,11 @@ def build(bld):
     for t in templates:
         obj = bld(features = 'subst')
         obj.source = [ t ]
-        obj.target = [ os.path.basename(t.srcpath()).replace('.in', '') ]
+        dir_name = os.path.basename(t.srcpath()).replace('.template.in', '')
+        file_name = os.path.basename(t.srcpath()).replace('.in', '')
+        obj.target = [ os.path.join(dir_name, file_name) ]
         obj.dict = subst_dict
-        obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', 'templates')
+        obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name))
 
 def options(opt):
     pass