You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2020/02/22 21:07:20 UTC

[yetus] branch master updated: YETUS-942. yetus-dl for specific versions is broken (#92)

This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new 52ac7ff  YETUS-942. yetus-dl for specific versions is broken (#92)
52ac7ff is described below

commit 52ac7ff519391e4fb3aa73630ea2692ea226ffa7
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Sat Feb 22 13:07:10 2020 -0800

    YETUS-942. yetus-dl for specific versions is broken (#92)
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 yetus-dl.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/yetus-dl.sh b/yetus-dl.sh
index a37144d..0da447d 100755
--- a/yetus-dl.sh
+++ b/yetus-dl.sh
@@ -17,13 +17,15 @@
 
 EXTRACTDIR="${1:-/tmp/yetus}"
 VERSION=${2:-latest}
-KEYSURL="https://www.apache.org/dist/yetus/KEYS"
+KEYSURL="https://www.apache.org/dist/yetus"
 if [ "${VERSION}" != "latest" ]; then
   BASEURL="https://www.apache.org/dyn/closer.cgi?action=download&filename=yetus/${VERSION}"
   YETUSTGZ="apache-yetus-${VERSION}-bin.tar.gz"
+  ASCURL="${KEYSURL}/${VERSION}/${YETUSTGZ}.asc"
 else
-  BASEURL="https://yetus.apache.org"
   YETUSTGZ="latest.tgz"
+  BASEURL="https://yetus.apache.org"
+  ASCURL="${BASEURL}/${YETUSTGZ}.asc"
 fi
 
 if [ ! -d "${EXTRACTDIR}" ]; then
@@ -33,12 +35,12 @@ if [ ! -d "${EXTRACTDIR}" ]; then
   fi
 fi
 
-if ! curl -f -s -L -o "${EXTRACTDIR}/KEYS" "${KEYSURL}"; then
+if ! curl -f -s -L -o "${EXTRACTDIR}/KEYS" "${KEYSURL}/KEYS"; then
   echo "ERROR: yetus-dl: unable to fetch ${KEYSURL}"
   exit 1
 fi
 
-if ! curl -f -s -L -o "${EXTRACTDIR}/${YETUSTGZ}.asc" "${BASEURL}/${YETUSTGZ}.asc"; then
+if ! curl -f -s -L -o "${EXTRACTDIR}/${YETUSTGZ}.asc" "${ASCURL}"; then
   echo "ERROR: yetus-dl: unable to fetch ${BASEURL}/${YETUSTGZ}.asc"
   exit 1
 fi