]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/bash/meson.build
Merge pull request #9560 from mbiebl/uaccess-dev-kvm
[thirdparty/systemd.git] / shell-completion / bash / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
3a726fcd 2
5c23128d
ZJS
3bashcompletiondir = get_option('bashcompletiondir')
4if bashcompletiondir == ''
37efbbd8
ZJS
5 bash_completion = dependency('bash-completion', required : false)
6 if bash_completion.found()
7 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
8 else
9 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
10 endif
5c23128d
ZJS
11endif
12
13if bashcompletiondir != 'no'
37efbbd8
ZJS
14 bash_systemctl = configure_file(
15 input : 'systemctl.in',
16 output : 'systemctl',
17 configuration : substs)
5c23128d 18
37efbbd8
ZJS
19 items = [['busctl', ''],
20 ['journalctl', ''],
21 ['systemd-analyze', ''],
22 ['systemd-cat', ''],
23 ['systemd-cgls', ''],
24 ['systemd-cgtop', ''],
25 ['systemd-delta', ''],
26 ['systemd-detect-virt', ''],
27 ['systemd-nspawn', ''],
28 ['systemd-path', ''],
29 ['systemd-run', ''],
30 ['udevadm', ''],
31 ['kernel-install', ''],
32 [bash_systemctl, ''],
33 ['bootctl', 'ENABLE_EFI'],
34 ['coredumpctl', 'ENABLE_COREDUMP'],
35 ['hostnamectl', 'ENABLE_HOSTNAMED'],
36 ['localectl', 'ENABLE_LOCALED'],
37 ['loginctl', 'ENABLE_LOGIND'],
38 ['machinectl', 'ENABLE_MACHINED'],
39 ['networkctl', 'ENABLE_NETWORKD'],
37e21077 40 ['portablectl', 'ENABLE_PORTABLED'],
bd188ff0 41 ['resolvectl', 'ENABLE_RESOLVE'],
37e21077 42 ['systemd-resolve', 'ENABLE_RESOLVE'],
37efbbd8
ZJS
43 ['timedatectl', 'ENABLE_TIMEDATED'],
44 ]
5c23128d 45
37efbbd8 46 foreach item : items
349cc4a5 47 if item[1] == '' or conf.get(item[1]) == 1
37efbbd8
ZJS
48 install_data(item[0],
49 install_dir : bashcompletiondir)
50 endif
51 endforeach
5c23128d 52endif