From 8db955c711c0928e241e5dc7b77bf335dd4bb6d6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 26 Nov 2010 20:33:47 +0000 Subject: Remove scheme from LV2 #include directives. Check the given header directory is named 'lv2' (to conform to #include standard). --- core.lv2/lv2config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core.lv2/lv2config') diff --git a/core.lv2/lv2config b/core.lv2/lv2config index 5f43716..10d77e3 100755 --- a/core.lv2/lv2config +++ b/core.lv2/lv2config @@ -104,6 +104,10 @@ def build_tree(search_path, outdir): """Build a directory tree under outdir containing symlinks to all LV2 extensions found in search_path, such that the symlink paths correspond to the extension URIs.""" + if os.path.basename(outdir) != 'lv2': + print >> sys.stderr, "lv2config: output dir must be named `lv2'" + sys.exit(1) + if os.access(outdir, os.F_OK) and not os.access(outdir, os.W_OK): print >> sys.stderr, "lv2config: cannot build `%s': Permission denied" % outdir sys.exit(1) @@ -120,9 +124,8 @@ def build_tree(search_path, outdir): # Query extension URI specs = rdf_find_type(manifest, lv2.Specification) for ext_uri in specs: - ext_scheme = ext_uri[0:ext_uri.find(':')] ext_path = os.path.normpath(ext_uri[ext_uri.find(':') + 1:].lstrip('/')) - ext_dir = os.path.join(outdir, ext_scheme, ext_path) + ext_dir = os.path.join(outdir, ext_path) # Make parent directories __mkdir_p(os.path.dirname(ext_dir)) -- cgit v1.2.1