1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
5 bashcompletiondir = get_option('bashcompletiondir')
6 if bashcompletiondir == ''
7 bash_completion = dependency('bash-completion', required : false)
8 if bash_completion.found()
9 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
11 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
14 message('bash completions: @0@'.format(bashcompletiondir))
17 if bashcompletiondir != 'no'
18 bash_systemctl = configure_file(
19 input : 'systemctl.in',
21 configuration : substs)
23 items = [['busctl', ''],
25 ['systemd-analyze', ''],
28 ['systemd-cgtop', ''],
29 ['systemd-delta', ''],
30 ['systemd-detect-virt', ''],
31 ['systemd-nspawn', ''],
35 ['kernel-install', ''],
37 ['bootctl', 'ENABLE_EFI'],
38 ['coredumpctl', 'ENABLE_COREDUMP'],
39 ['hostnamectl', 'ENABLE_HOSTNAMED'],
40 ['localectl', 'ENABLE_LOCALED'],
41 ['loginctl', 'ENABLE_LOGIND'],
42 ['machinectl', 'ENABLE_MACHINED'],
43 ['networkctl', 'ENABLE_NETWORKD'],
44 ['systemd-resolve', 'ENABLE_RESOLVE'],
45 ['timedatectl', 'ENABLE_TIMEDATED'],
49 if item[1] == '' or conf.get(item[1]) == 1
51 install_dir : bashcompletiondir)