Skip to content

Commit

Permalink
dev-vcs/repo: add bash-completion support
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <[email protected]>
  • Loading branch information
vapier committed Mar 15, 2021
1 parent 52f67c9 commit f832138
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-vcs/repo/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST repo-2.11 39791 BLAKE2B 535de238d934eb2717af7bddd960c158501a56dd400ae02f3665e30c34bd68a1973de4c84e2ea76f48aa027249dfd4270153f1a7d4c4a2d5d883b580f02664e9 SHA512 1889ee9c782a6dc90b782c8ca9c5411b97c4495e0d27add62b9661a5961a782096037e081e984c965e44d33459e8fe4428528b5ebfff9fe356ce401cb610480a
DIST repo-2.12 43035 BLAKE2B 3a3b1997a09f08093aa2d5cf6c7a3747d6a9a6c29e6c199574757d4d87fdd57b7cc8b18bb1ddfa7c47392f73a22211f996f6ba8175448162e305106c9ac6cafe SHA512 409525040ec8fe6c6a6d923c4e23ab93f5ccc62d01d310ad6b56d55f45d88c2bf469e9b46943e799b8d5238cbc0a9610d0f64f35cf0f3a68b79cbd8c92f044a3
DIST repo-511a0e54f5801a3f36c00fac478a596d83867d10-bash-completion.sh.base64 4280 BLAKE2B 6c369d36176d5bd4d3f4ed4df39bbd6542022dd186375bd05a978889c574819e3328d19c7dac2982233614786078f73bfd1f0c80aa7c0c6c79bdfab776ed6e39 SHA512 f484bee79c3724a6daf8a69b3df80feef3c6aaad3bfb49443caabc52735dd7f3b0fcb3ad4b7480bc020c9b4cac2f3b044693ef761df6fc9d34e854289baf1f3d
42 changes: 42 additions & 0 deletions dev-vcs/repo/repo-2.12-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# NB: The $PV tracks the *repo launcher version*, not the last signed release
# of the repo project. The launcher only gets a new update when changes are
# made in it.

EAPI="7"

PYTHON_COMPAT=( python3_{7..9} )

inherit bash-completion-r1 python-r1

# This file rarely changes, so track it independently.
COMP_VER="511a0e54f5801a3f36c00fac478a596d83867d10"
COMP_NAME="${PN}-${COMP_VER}-bash-completion.sh.base64"

DESCRIPTION="Google tool for managing git, particularly multiple repos"
HOMEPAGE="https://gerrit.googlesource.com/git-repo"
SRC_URI="https://storage.googleapis.com/git-repo-downloads/${P}
https://gerrit.googlesource.com/git-repo/+/${COMP_VER}/completion.bash?format=TEXT -> ${COMP_NAME}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
!app-admin/radmind
!dev-util/repo"

S=${WORKDIR}

src_unpack() {
base64 -d <"${DISTDIR}/${COMP_NAME}" >completion.bash || die
}

src_install() {
python_foreach_impl python_newscript "${DISTDIR}/${P}" ${PN}
newbashcomp completion.bash ${PN}
}

0 comments on commit f832138

Please sign in to comment.