From 0195ce4168ad8cc4560cdb1a5b64f022a2703c10 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Mon, 9 Jan 2017 13:08:21 +0900 Subject: tree.sh: more maven version compatibility tricks. --- scripts/meta.sh | 5 +++++ scripts/tree.sh | 31 ++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/meta.sh b/scripts/meta.sh index 42a45a2..82d3dc1 100755 --- a/scripts/meta.sh +++ b/scripts/meta.sh @@ -69,6 +69,11 @@ case ${spkg} in echo $1:org.ow2.asm:${spkg}-all:${sver%%-*} echo $1:org.ow2.asm:${spkg}-debug-all:${sver%%-*} exit 0 + ;; + cofoja) + echo $1:org.huoc:${spkg}:${sver%%-*} + exit 0 + ;; esac touch bebd bpom diff --git a/scripts/tree.sh b/scripts/tree.sh index 8de9045..3b44481 100755 --- a/scripts/tree.sh +++ b/scripts/tree.sh @@ -16,8 +16,7 @@ gebd() { local WORKDIR=${PG//./\/}/${MA} MID local MID=${PG}:${MA}:${MV} - # .Final .GA .v20121024 means nothing - local PV=${MV%.[a-zA-Z]*} PA SLOT + local PV=${MV} PA SLOT case ${MA} in opengl-api) @@ -25,17 +24,39 @@ gebd() { ;; esac + # com.github.lindenb:jbwa:1.0.0_ppc64 + PV=${PV/_/.} # plexus-container-default 1.0-alpha-9-stable-1 - PV=${PV/-stable-*/} - PV=${PV/-alpha-/_alpha} + PV=${PV/-stable-/.} + PV=$(sed -r 's/[.-]?alpha[-.]?/_alpha/' <<< ${PV}) # wagon-provider-api 1.0-beta-7 - PV=${PV/-beta-/_beta} + # com.google.cloud.datastore:datastore-v1beta3-proto-client:1.0.0-beta.2 + # com.google.cloud.datastore:datastore-v1beta3-protos:1.0.0-beta + PV=$(sed -r 's/[.-]?beta[-.]?/_beta/' <<< ${PV}) # aopalliance-repackaged 2.5.0-b16 PV=${PV/-b/_beta} + # com.google.auto.service:auto-service:1.0-rc2 + PV=${PV/-rc/_rc} # cdi-api 1.0-SP4 PV=${PV/-SP/_p} + # org.seqdoop:cofoja:1.1-r150 + PV=${PV/-rev/_p} + PV=${PV/-r/_p} + PV=${PV/.v/_p} # javax.xml.stream:stax-api:1.0-2 PV=${PV//-/.} + # .Final .GA -incubating means nothing + 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}) + # 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/*_/} + else + PV=$(sed 's/[^.0-9]//g' <<< ${PV}) + fi # spark-launcher_2.11 for scala 2.11 eval $(sed -nr 's,([^_]*)(_(.*))?,PA=\1 SLOT=\3,p' <<< ${MA}) -- cgit v1.2.3-65-gdbad