commit:     83a37b26ab6136b35baa1f1867c8766ae8e8c023
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 18 02:00:17 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Mar 18 02:00:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83a37b26

net-misc/rclone: Add bash & zfs autocompletion

Closes: https://bugs.gentoo.org/650726
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-misc/rclone/rclone-1.39.ebuild | 17 +++++++++++++----
 net-misc/rclone/rclone-9999.ebuild | 11 +++++++++--
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/net-misc/rclone/rclone-1.39.ebuild 
b/net-misc/rclone/rclone-1.39.ebuild
index ab1b0c69b3d..2c530609ee7 100644
--- a/net-misc/rclone/rclone-1.39.ebuild
+++ b/net-misc/rclone/rclone-1.39.ebuild
@@ -1,10 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-
-inherit golang-build
-
+inherit golang-build bash-completion-r1
 EGO_PN="github.com/ncw/${PN}"
 
 if [[ ${PV} == *9999* ]]; then
@@ -21,9 +19,20 @@ HOMEPAGE="https://rclone.org/";
 
 LICENSE="MIT"
 SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
 
 src_install() {
        dobin ${PN}
        doman src/${EGO_PN}/${PN}.1
        dodoc src/${EGO_PN}/README.md
+
+       ./rclone genautocomplete bash ${PN}.bash || die
+       newbashcomp ${PN}.bash ${PN}
+
+       ./rclone genautocomplete zsh ${PN}.zsh || die
+       insinto /usr/share/zsh/site-functions
+       newins ${PN}.zsh _${PN}
 }

diff --git a/net-misc/rclone/rclone-9999.ebuild 
b/net-misc/rclone/rclone-9999.ebuild
index 0c936bdca50..2c530609ee7 100644
--- a/net-misc/rclone/rclone-9999.ebuild
+++ b/net-misc/rclone/rclone-9999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit golang-build
+inherit golang-build bash-completion-r1
 EGO_PN="github.com/ncw/${PN}"
 
 if [[ ${PV} == *9999* ]]; then
@@ -28,4 +28,11 @@ src_install() {
        dobin ${PN}
        doman src/${EGO_PN}/${PN}.1
        dodoc src/${EGO_PN}/README.md
+
+       ./rclone genautocomplete bash ${PN}.bash || die
+       newbashcomp ${PN}.bash ${PN}
+
+       ./rclone genautocomplete zsh ${PN}.zsh || die
+       insinto /usr/share/zsh/site-functions
+       newins ${PN}.zsh _${PN}
 }

Reply via email to