diff options
author | Thomas Haller <thaller@redhat.com> | 2022-05-13 16:15:13 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-05-13 16:15:18 +0200 |
commit | 7062de9219d2e02aa8ce59ca773dd96358309113 (patch) | |
tree | 12b2e66a6ec11a6a25e82cdc14930892ae17fc6a | |
parent | d4d001c7713f97489cc099ac768db04653b2f0b5 (diff) | |
download | NetworkManager-7062de9219d2e02aa8ce59ca773dd96358309113.tar.gz |
build/meson: use "rename" directive for installing nmcli bash completion
Otherwise, `ninja -C build uninstall` tries to delete "nmcli-completion",
when the file got renamed to "nmcli".
We depend on meson 0.47.2 already.
-rw-r--r-- | src/nmcli/meson.build | 4 | ||||
-rwxr-xr-x | tools/meson-post-install.sh | 5 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/nmcli/meson.build b/src/nmcli/meson.build index fab7329ea0..a122e2af3a 100644 --- a/src/nmcli/meson.build +++ b/src/nmcli/meson.build @@ -2,12 +2,10 @@ if enable_nmcli -# The file is called "nmcli-completion" but should be installed with -# name "nmcli". Currently it gets renamed by "tools/meson-post-install.sh", -# but if we depend on meson 0.46.0, we could use "rename" option. install_data( 'nmcli-completion', install_dir: join_paths(nm_datadir, 'bash-completion', 'completions'), + rename: 'nmcli', ) executable( diff --git a/tools/meson-post-install.sh b/tools/meson-post-install.sh index 897a8c5c76..88e30ccfc1 100755 --- a/tools/meson-post-install.sh +++ b/tools/meson-post-install.sh @@ -14,11 +14,6 @@ install_systemdunitdir="${11}" [ -n "$DESTDIR" ] && DESTDIR="${DESTDIR%%/}/" -if [ -f "${DESTDIR}${nm_datadir}/bash-completion/completions/nmcli-completion" ]; then - mv "${DESTDIR}${nm_datadir}/bash-completion/completions/nmcli-completion" \ - "${DESTDIR}${nm_datadir}/bash-completion/completions/nmcli" -fi - if [ -x "${DESTDIR}${nm_bindir}/nmtui" ]; then for alias in nmtui-connect nmtui-edit nmtui-hostname; do ln -sf nmtui "${DESTDIR}${nm_bindir}/$alias" |