1 # SPDX-License-Identifier: LGPL-2.1+
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')
9 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
13 if bashcompletiondir != 'no'
14 bash_systemctl = configure_file(
15 input : 'systemctl.in',
17 configuration : substs)
19 items = [['busctl', ''],
21 ['systemd-analyze', ''],
24 ['systemd-cgtop', ''],
25 ['systemd-delta', ''],
26 ['systemd-detect-virt', ''],
27 ['systemd-nspawn', ''],
31 ['kernel-install', ''],
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'],
40 ['portablectl', 'ENABLE_PORTABLED'],
41 ['resolvectl', 'ENABLE_RESOLVE'],
42 ['systemd-resolve', 'ENABLE_RESOLVE'],
43 ['timedatectl', 'ENABLE_TIMEDATED'],
47 if item[1] == '' or conf.get(item[1]) == 1
49 install_dir : bashcompletiondir)