commit:     0b896cd6c8f7e38f3c7e4c18f4a133cf6f591bed
Author:     Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
AuthorDate: Thu Aug  4 18:33:48 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  5 01:52:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b896cd6

dev-util/sh: add live build

Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/sh/sh-3.5.1.ebuild                     | 14 ++++++++++----
 dev-util/sh/{sh-3.5.1.ebuild => sh-9999.ebuild} | 14 ++++++++++----
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/dev-util/sh/sh-3.5.1.ebuild b/dev-util/sh/sh-3.5.1.ebuild
index 7da56df5263e..ea48ab9e9b7d 100644
--- a/dev-util/sh/sh-3.5.1.ebuild
+++ b/dev-util/sh/sh-3.5.1.ebuild
@@ -7,12 +7,19 @@ inherit go-module
 
 DESCRIPTION="A shell parser, formatter, and interpreter with bash support"
 HOMEPAGE="https://github.com/mvdan/sh";
-SRC_URI="https://github.com/mvdan/sh/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz";
+
+if [[ ${PV} == *9999 ]]; then
+       EGIT_REPO_URI="https://github.com/mvdan/sh.git";
+       inherit git-r3
+else
+       SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+       SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz";
+       KEYWORDS="~amd64 ~arm64 ~x86"
+       S="${WORKDIR}/${PN//fmt/}-${PV}"
+fi
 
 LICENSE="Apache-2.0 BSD"
 SLOT="0"
-KEYWORDS="~amd64"
 IUSE="+man"
 
 BDEPEND="man? ( app-text/scdoc )"
@@ -44,5 +51,4 @@ src_install() {
        if use man; then
                doman shfmt.1
        fi
-
 }

diff --git a/dev-util/sh/sh-3.5.1.ebuild b/dev-util/sh/sh-9999.ebuild
similarity index 69%
copy from dev-util/sh/sh-3.5.1.ebuild
copy to dev-util/sh/sh-9999.ebuild
index 7da56df5263e..ea48ab9e9b7d 100644
--- a/dev-util/sh/sh-3.5.1.ebuild
+++ b/dev-util/sh/sh-9999.ebuild
@@ -7,12 +7,19 @@ inherit go-module
 
 DESCRIPTION="A shell parser, formatter, and interpreter with bash support"
 HOMEPAGE="https://github.com/mvdan/sh";
-SRC_URI="https://github.com/mvdan/sh/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz";
+
+if [[ ${PV} == *9999 ]]; then
+       EGIT_REPO_URI="https://github.com/mvdan/sh.git";
+       inherit git-r3
+else
+       SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+       SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz";
+       KEYWORDS="~amd64 ~arm64 ~x86"
+       S="${WORKDIR}/${PN//fmt/}-${PV}"
+fi
 
 LICENSE="Apache-2.0 BSD"
 SLOT="0"
-KEYWORDS="~amd64"
 IUSE="+man"
 
 BDEPEND="man? ( app-text/scdoc )"
@@ -44,5 +51,4 @@ src_install() {
        if use man; then
                doman shfmt.1
        fi
-
 }

Reply via email to