diff options
author | Dave Reisner <dreisner@archlinux.org> | 2018-11-14 05:17:02 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-11-27 13:48:43 +0100 |
commit | d81b5cc2a5193a344fc6f9cbf72d406d5597d85b (patch) | |
tree | 4eaf6989fb5d733775bc077700593bac35ce94c9 | |
parent | 1aaf95089a971730b1c7bcdf6fd98c0534459b01 (diff) | |
download | pacman-d81b5cc2a5193a344fc6f9cbf72d406d5597d85b.tar.gz pacman-d81b5cc2a5193a344fc6f9cbf72d406d5597d85b.tar.xz |
scripts/meson: ensure wrapper scripts are executable
-rw-r--r-- | scripts/meson.build | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/scripts/meson.build b/scripts/meson.build index aece7a22..344333be 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -52,21 +52,18 @@ foreach script : wrapped_scripts depend_files : library_files, build_by_default : true) + cdata = configuration_data() + cdata.set_quoted('BASH', BASH.path()) + cdata.set_quoted('BUILDDIR', meson.current_build_dir()) + cdata.set_quoted('REAL_PROGPATH', internal_script.full_path()) + # Create a wrapper script that bootstraps the real script within the build - # directory. - custom_target( - 'wrap_@0@'.format(script_shortname), + # directory. Use configure_file instead of a custom_target to ensure that + # permissions on the input script wrapper are preserved. + configure_file( input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'), output : script_shortname, - build_by_default : true, - command : [ - SED, - '-e', 's,@BASH@,"@0@",'.format(BASH.path()), - '-e', 's,@BUILDDIR@,"@0@",'.format(meson.current_build_dir()), - '-e', 's,@REAL_PROGPATH@,"@0@",'.format(internal_script.full_path()), - '@INPUT@', - ], - capture : true) + configuration : cdata) # Install the real script meson.add_install_script(MESON_INSTALL_SCRIPT, |