From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3D361584AD for ; Thu, 24 Apr 2025 19:30:30 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id AF24C343088 for ; Thu, 24 Apr 2025 19:30:30 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id CF9EF1104A9; Thu, 24 Apr 2025 19:30:26 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C95511104A9 for ; Thu, 24 Apr 2025 19:30:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7D563342FDB for ; Thu, 24 Apr 2025 19:30:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7D722529 for ; Thu, 24 Apr 2025 19:30:24 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1745522966.791d259dfcc7395b2e564a135de0d885aaee4104.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/pkgcraft-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild X-VCS-Directories: sys-apps/pkgcraft-tools/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 791d259dfcc7395b2e564a135de0d885aaee4104 X-VCS-Branch: master Date: Thu, 24 Apr 2025 19:30:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a73ef96d-2ebc-431c-867b-919d9b440864 X-Archives-Hash: d0b4bcea03bf03867ec6879528ba0d6d commit: 791d259dfcc7395b2e564a135de0d885aaee4104 Author: Arthur Zamarin gentoo org> AuthorDate: Thu Apr 24 19:29:26 2025 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Thu Apr 24 19:29:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=791d259d sys-apps/pkgcraft-tools: (live) build shell completions and install Signed-off-by: Arthur Zamarin gentoo.org> sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild b/sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild index cd08702104d1..24e827b171dd 100644 --- a/sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild +++ b/sys-apps/pkgcraft-tools/pkgcraft-tools-9999.ebuild @@ -54,6 +54,19 @@ src_unpack() { fi } +src_compile() { + cargo_src_compile + + if [[ ${PV} == 9999 ]] ; then + einfo "Generating shell completions" + mkdir shell || die + local BIN="${WORKDIR}/${P}/$(cargo_target_dir)/pk" + "${BIN}" completion bash > shell/pk.bash || die + "${BIN}" completion zsh > shell/_pk || die + "${BIN}" completion fish > shell/pk.fish || die + fi +} + src_test() { unset CLICOLOR CLICOLOR_FORCE @@ -70,9 +83,7 @@ src_test() { src_install() { cargo_src_install - if [[ ${PV} != 9999 ]] ; then - newbashcomp shell/pk.bash pk - dozshcomp shell/_pk - dofishcomp shell/pk.fish - fi + newbashcomp shell/pk.bash pk + dozshcomp shell/_pk + dofishcomp shell/pk.fish }