net-misc/rclone: Add bash & zfs autocompletion
authorJason Zaman <perfinion@gentoo.org>
Sun, 18 Mar 2018 02:00:17 +0000 (10:00 +0800)
committerJason Zaman <perfinion@gentoo.org>
Sun, 18 Mar 2018 02:00:39 +0000 (10:00 +0800)
Closes: https://bugs.gentoo.org/650726
Package-Manager: Portage-2.3.24, Repoman-2.3.6

net-misc/rclone/rclone-1.39.ebuild
net-misc/rclone/rclone-9999.ebuild

index ab1b0c69b3d5310499d9214088c8d289bffb8aa8..2c530609ee7beb52de648e1db2ddb247b242b6f3 100644 (file)
@@ -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}
 }
index 0c936bdca50e7420ac2610a42a6ffa8d7715a058..2c530609ee7beb52de648e1db2ddb247b242b6f3 100644 (file)
@@ -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}
 }