diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-01-11 21:06:35 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-01-11 21:23:16 -0500 |
commit | f4256533d1ffdc203c3f8c6ee42e8dcde470a93f (patch) | |
tree | a151b8f034913216edde8d5d9648219f41d5d1b6 | |
parent | 6981e033be150d232e5282d071885549c7efd6b4 (diff) |
use more idiomatic/correct embedded shell scripting
Formatting arguments into code is fragile, and meson natively knows how
to pass files as arguments via argv. So pass them as arguments to the
shell.
-rw-r--r-- | doc/dbus/meson.build | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/dbus/meson.build b/doc/dbus/meson.build index 802938e..861da64 100644 --- a/doc/dbus/meson.build +++ b/doc/dbus/meson.build @@ -19,11 +19,10 @@ foreach interface_file: dbus_interfaces_files capture: true, command: [ bash, '-c', - 'cat @INPUT@;' + - xsltproc.path() + ' @0@/@1@ '.format( - meson.source_root(), - files('spec-to-docbook.xsl')[0]) + - interface_file.full_path() + '| tail -n +2;', + 'cat "$1"; "$2" "$3" "$4" | tail -n +2', + '_', # argv0 ignored + '@INPUT@', + xsltproc, files('spec-to-docbook.xsl')[0], interface_file ], ) endforeach |