From d474285da18b329cdeef5ba10c158fe3bdaa701c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 16 Mar 2021 14:10:32 +0100 Subject: [PATCH] add bash completion --- scripts/backup | 1 + scripts/install | 1 + scripts/remove | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 5 files changed, 5 insertions(+) diff --git a/scripts/backup b/scripts/backup index b6ff79f..3328385 100755 --- a/scripts/backup +++ b/scripts/backup @@ -54,6 +54,7 @@ ynh_backup --src_path="/usr/local/bin/lxc" ynh_backup --src_path="/usr/local/bin/lxd" ynh_backup --src_path="/usr/local/bin/lxc-to-lxd" ynh_backup --src_path="/usr/local/bin/lxd-p2c" +ynh_backup --src_path="/etc/bash_completion.d/lxd-client" ynh_backup --src_path="/etc/dnsmasq.d/lxd" diff --git a/scripts/install b/scripts/install index 375d92f..22fc194 100755 --- a/scripts/install +++ b/scripts/install @@ -86,6 +86,7 @@ mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin +cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd ynh_secure_remove --file="$go_tmp" diff --git a/scripts/remove b/scripts/remove index 4eff0ab..7565039 100755 --- a/scripts/remove +++ b/scripts/remove @@ -76,6 +76,7 @@ ynh_secure_remove --file="/usr/local/bin/lxc" ynh_secure_remove --file="/usr/local/bin/lxd" ynh_secure_remove --file="/usr/local/bin/lxc-to-lxd" ynh_secure_remove --file="/usr/local/bin/lxd-p2c" +ynh_secure_remove --file="/etc/bash_completion.d/lxd-client" sed -i "/# Added by lxd$/{N;/root:100000:65536/d}" /etc/sub{u,g}id diff --git a/scripts/restore b/scripts/restore index 6b2e2bb..aea4fbd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -83,6 +83,7 @@ ynh_restore_file --origin_path="/usr/local/bin/lxc" ynh_restore_file --origin_path="/usr/local/bin/lxd" ynh_restore_file --origin_path="/usr/local/bin/lxc-to-lxd" ynh_restore_file --origin_path="/usr/local/bin/lxd-p2c" +ynh_restore_file --origin_path="/etc/bash_completion.d/lxd-client" ynh_restore_file --origin_path="/etc/dnsmasq.d/lxd" diff --git a/scripts/upgrade b/scripts/upgrade index ceb6ff8..5c9680d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,6 +94,7 @@ mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin +cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd ynh_secure_remove --file="$go_tmp"