1 bashcompletiondir = get_option('bashcompletiondir')
2 if bashcompletiondir == ''
3 bash_completion = dependency('bash-completion', required : false)
4 if bash_completion.found()
5 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
7 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
10 message('bash completions: @0@'.format(bashcompletiondir))
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 ['systemd-resolve', 'ENABLE_RESOLVED'],
41 ['timedatectl', 'ENABLE_TIMEDATED'],
45 if item[1] == '' or conf.get(item[1], false)
47 install_dir : bashcompletiondir)