]>
Commit | Line | Data |
---|---|---|
3a726fcd | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
3a726fcd | 2 | |
5c23128d ZJS |
3 | bashcompletiondir = get_option('bashcompletiondir') |
4 | if 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 | 11 | |
37efbbd8 | 12 | message('bash completions: @0@'.format(bashcompletiondir)) |
5c23128d ZJS |
13 | endif |
14 | ||
15 | if bashcompletiondir != 'no' | |
37efbbd8 ZJS |
16 | bash_systemctl = configure_file( |
17 | input : 'systemctl.in', | |
18 | output : 'systemctl', | |
19 | configuration : substs) | |
5c23128d | 20 | |
37efbbd8 ZJS |
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'], | |
37e21077 | 42 | ['portablectl', 'ENABLE_PORTABLED'], |
bd188ff0 | 43 | ['resolvectl', 'ENABLE_RESOLVE'], |
37e21077 | 44 | ['systemd-resolve', 'ENABLE_RESOLVE'], |
37efbbd8 ZJS |
45 | ['timedatectl', 'ENABLE_TIMEDATED'], |
46 | ] | |
5c23128d | 47 | |
37efbbd8 | 48 | foreach item : items |
349cc4a5 | 49 | if item[1] == '' or conf.get(item[1]) == 1 |
37efbbd8 ZJS |
50 | install_data(item[0], |
51 | install_dir : bashcompletiondir) | |
52 | endif | |
53 | endforeach | |
5c23128d | 54 | endif |