|
| 1 | +#!/usr/bin/env bash |
| 2 | +# |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +# or more contributor license agreements. See the NOTICE file |
| 5 | +# distributed with this work for additional information |
| 6 | +# regarding copyright ownership. The ASF licenses this file |
| 7 | +# to you under the Apache License, Version 2.0 (the |
| 8 | +# "License"); you may not use this file except in compliance |
| 9 | +# with the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
| 19 | +# |
| 20 | +set -e |
| 21 | + |
| 22 | +PROJECT_NAME='grails-spring-security' |
| 23 | +REPO_NAME='apache/grails-spring-security' |
| 24 | +RELEASE_TAG=$1 |
| 25 | +DOWNLOAD_LOCATION="${2:-downloads}" |
| 26 | + |
| 27 | +if [ -z "${RELEASE_TAG}" ]; then |
| 28 | + echo "Usage: $0 [release-tag] <optional download location>" |
| 29 | + exit 1 |
| 30 | +fi |
| 31 | + |
| 32 | +echo "Downloading files to ${DOWNLOAD_LOCATION}" |
| 33 | +mkdir -p "${DOWNLOAD_LOCATION}" |
| 34 | + |
| 35 | +VERSION=${RELEASE_TAG#v} |
| 36 | + |
| 37 | +# Source distro |
| 38 | +curl -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip" "https://github.com/${REPO_NAME}/releases/download/$RELEASE_TAG/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip" |
| 39 | +curl -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip.asc" "https://github.com/${REPO_NAME}/releases/download/$RELEASE_TAG/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip.asc" |
| 40 | +curl -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip.sha512" "https://github.com/${REPO_NAME}/releases/download/$RELEASE_TAG/apache-${PROJECT_NAME}-$VERSION-incubating-src.zip.sha512" |
0 commit comments