meson: replace bashism is POSIX shell compliant code (#463)
This commit is contained in:
parent
8fc0f6e531
commit
262327a795
@ -222,15 +222,15 @@ install_subdir(
|
|||||||
# because configure_file strips the backslash in e.g. \@display,
|
# because configure_file strips the backslash in e.g. \@display,
|
||||||
# resulting in @display, breaking our Perl code:
|
# resulting in @display, breaking our Perl code:
|
||||||
# https://github.com/mesonbuild/meson/issues/7165
|
# https://github.com/mesonbuild/meson/issues/7165
|
||||||
bash = find_program('bash')
|
sh = find_program('sh')
|
||||||
replace_dirs = [
|
replace_dirs = [
|
||||||
bash, '-c', # Use bash to capture output and mark as executable
|
sh, '-c', # Use bash to capture output and mark as executable
|
||||||
'sed -e \'s,@abs_top_builddir@,'
|
'sed -e \'s,@abs_top_builddir@,'
|
||||||
+ meson.current_build_dir()
|
+ meson.current_build_dir()
|
||||||
+ ',g;s,@abs_top_srcdir@,'
|
+ ',g;s,@abs_top_srcdir@,'
|
||||||
+ meson.current_source_dir()+',g\''
|
+ meson.current_source_dir()+',g\''
|
||||||
# Only mark files ending in .pl as executables
|
# Only mark files ending in .pl as executables
|
||||||
+ ' "$0" > "$1" && { [[ "${1##*.}" == pl ]] && chmod +x "$1" || true; }',
|
+ ' "$0" > "$1" && { [ "${1##*.}" = pl ] && chmod +x "$1" || true; }',
|
||||||
'@INPUT0@', # $0
|
'@INPUT0@', # $0
|
||||||
'@OUTPUT0@', # $1
|
'@OUTPUT0@', # $1
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user