aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/completion/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/completion/meson.build')
-rw-r--r--contrib/completion/meson.build18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/completion/meson.build b/contrib/completion/meson.build
index 3a9ddab594..576125b083 100644
--- a/contrib/completion/meson.build
+++ b/contrib/completion/meson.build
@@ -14,3 +14,21 @@ foreach script : [
)
endif
endforeach
+
+# We have to discern between the test dependency and the installed file. Our
+# tests assume the completion scripts to have the same name as the in-tree
+# files, but the installed filenames need to match the executable's basename.
+if meson.version().version_compare('>=1.3.0')
+ fs.copyfile('git-completion.bash', 'git',
+ install: true,
+ install_dir: get_option('datadir') / 'bash-completion/completions',
+ )
+else
+ configure_file(
+ input: 'git-completion.bash',
+ output: 'git',
+ copy: true,
+ install: true,
+ install_dir: get_option('datadir') / 'bash-completion/completions',
+ )
+endif