]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/bash/meson.build
bbd705c1cf97d6481a8b0205b0822990a5ae6931
[thirdparty/systemd.git] / shell-completion / bash / meson.build
1 # -*- mode: meson -*-
2
3 bashcompletiondir = get_option('bashcompletiondir')
4 if bashcompletiondir == ''
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 = datadir + '/bash-completion/completions'
10 endif
11
12 message('bash completions: @0@'.format(bashcompletiondir))
13 endif
14
15 if bashcompletiondir != 'no'
16 bash_systemctl = configure_file(
17 input : 'systemctl.in',
18 output : 'systemctl',
19 configuration : substs)
20
21 items = [['busctl', ''],
22 ['journalctl', ''],
23 ['systemd-analyze', ''],
24 ['systemd-cat', ''],
25 ['systemd-cgls', ''],
26 ['systemd-cgtop', ''],
27 ['systemd-delta', ''],
28 ['systemd-detect-virt', ''],
29 ['systemd-nspawn', ''],
30 ['systemd-path', ''],
31 ['systemd-run', ''],
32 ['udevadm', ''],
33 ['kernel-install', ''],
34 [bash_systemctl, ''],
35 ['bootctl', 'ENABLE_EFI'],
36 ['coredumpctl', 'ENABLE_COREDUMP'],
37 ['hostnamectl', 'ENABLE_HOSTNAMED'],
38 ['localectl', 'ENABLE_LOCALED'],
39 ['loginctl', 'ENABLE_LOGIND'],
40 ['machinectl', 'ENABLE_MACHINED'],
41 ['networkctl', 'ENABLE_NETWORKD'],
42 ['systemd-resolve', 'ENABLE_RESOLVED'],
43 ['timedatectl', 'ENABLE_TIMEDATED'],
44 ]
45
46 foreach item : items
47 if item[1] == '' or conf.get(item[1], 0) == 1
48 install_data(item[0],
49 install_dir : bashcompletiondir)
50 endif
51 endforeach
52 endif