public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/java-ebuilder:master commit in: scripts/
Date: Wed, 30 Oct 2019 17:35:17 +0000 (UTC)	[thread overview]
Message-ID: <1483965809.147f237a57b7eea135c53f842d53c51a120d4d8c.mgorny@gentoo> (raw)

commit:     147f237a57b7eea135c53f842d53c51a120d4d8c
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  9 11:21:27 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan  9 12:43:29 2017 +0000
URL:        https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=147f237a

tree.sh: remove both beta and p in _beta1_p1.2.0.

 scripts/tree.sh | 48 +++++++++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/scripts/tree.sh b/scripts/tree.sh
index 3b44481..c44c127 100755
--- a/scripts/tree.sh
+++ b/scripts/tree.sh
@@ -6,24 +6,8 @@ source /etc/java-ebuilder.conf
 
 mkdir -p "${POMDIR}"
 
-gebd() {
-    case ${MA} in
-        weld-osgi-bundle)
-            # 1.1.0.Final no longer exist
-            [[ ${MV} = 1.1.0.Final ]] && MV=1.1.33.Final
-            ;;
-    esac
-
-    local WORKDIR=${PG//./\/}/${MA} MID
-    local MID=${PG}:${MA}:${MV}
-    local PV=${MV} PA SLOT
-
-    case ${MA} in
-        opengl-api)
-            [[ ${MV} = 2.1.1 ]] && MV=gl1.1-android-2.1_r1
-            ;;
-    esac
-
+sver() {
+    PV=$1
     # com.github.lindenb:jbwa:1.0.0_ppc64
     PV=${PV/_/.}
     # plexus-container-default 1.0-alpha-9-stable-1
@@ -49,14 +33,36 @@ gebd() {
     PV=${PV%.[a-zA-Z]*}
     # com.google.cloud.genomics:google-genomics-dataflow:v1beta2-0.15 -> 1.2.0.15
     # plexus-container-default 1.0-alpha-9-stable-1 -> 1.0.9.1
-    PV=$(sed -r 's/_(rc|beta|alpha|p)(.*\..*)/.\2/' <<< ${PV})
+    while [[ ${PV} != ${PV0} ]]; do
+	PV0=${PV}
+	PV=$(sed -r 's/_(rc|beta|alpha|p)(.*\..*)/.\2/' <<< ${PV0})
+    done
     # remove all non-numeric charactors before _
     # org.scalamacros:quasiquotes_2.10:2.0.0-M8
     if [[ ${PV} = *_* ]]; then
-	PV=$(sed 's/[^.0-9]//g' <<< ${PV/_*/})_${PV/*_/}
+	echo $(sed 's/[^.0-9]//g' <<< ${PV/_*/})_${PV/*_/}
     else
-	PV=$(sed 's/[^.0-9]//g' <<< ${PV})
+	sed 's/[^.0-9]//g' <<< ${PV}
     fi
+}
+
+gebd() {
+    case ${MA} in
+        weld-osgi-bundle)
+            # 1.1.0.Final no longer exist
+            [[ ${MV} = 1.1.0.Final ]] && MV=1.1.33.Final
+            ;;
+    esac
+
+    local WORKDIR=${PG//./\/}/${MA} MID
+    local MID=${PG}:${MA}:${MV}
+    local PV=$(sver ${MV}) PA SLOT
+
+    case ${MA} in
+        opengl-api)
+            [[ ${MV} = 2.1.1 ]] && MV=gl1.1-android-2.1_r1
+            ;;
+    esac
 
     # spark-launcher_2.11 for scala 2.11
     eval $(sed -nr 's,([^_]*)(_(.*))?,PA=\1 SLOT=\3,p' <<< ${MA})


             reply	other threads:[~2019-10-30 17:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 17:35 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-06 10:56 [gentoo-commits] proj/java-ebuilder:master commit in: scripts/ Miroslav Šulc
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny
2019-10-30 17:35 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483965809.147f237a57b7eea135c53f842d53c51a120d4d8c.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox