mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
*: convert assorted download references to https
This commit is contained in:
parent
41adf5e105
commit
bad34243ef
@ -57,10 +57,10 @@ IMAGE_NAME="${RAW_IMAGE_NAME}.bz2"
|
||||
DIGESTS_NAME="${IMAGE_NAME}.DIGESTS.asc"
|
||||
|
||||
case ${VERSION_ID} in
|
||||
stable) BASE_URL="http://stable.release.core-os.net/amd64-usr/current" ;;
|
||||
alpha) BASE_URL="http://alpha.release.core-os.net/amd64-usr/current" ;;
|
||||
beta) BASE_URL="http://beta.release.core-os.net/amd64-usr/current" ;;
|
||||
*) BASE_URL="http://storage.core-os.net/coreos/amd64-usr/${VERSION_ID}" ;;
|
||||
stable) BASE_URL="https://stable.release.core-os.net/amd64-usr/current" ;;
|
||||
alpha) BASE_URL="https://alpha.release.core-os.net/amd64-usr/current" ;;
|
||||
beta) BASE_URL="https://beta.release.core-os.net/amd64-usr/current" ;;
|
||||
*) BASE_URL="https://alpha.release.core-os.net/amd64-usr/${VERSION_ID}" ;;
|
||||
esac
|
||||
|
||||
IMAGE_URL="${BASE_URL}/${IMAGE_NAME}"
|
||||
|
@ -15,7 +15,7 @@ release=${1:-"alpha"}
|
||||
|
||||
# If the argument is in the form http* allow for watching an arbitrary location
|
||||
if [[ $1 != http* ]]; then
|
||||
url="http://storage.core-os.net/coreos/amd64-usr/$release/version.txt"
|
||||
url="https://${release}.release.core-os.net/amd64-usr/current/version.txt"
|
||||
else
|
||||
url=$1
|
||||
release=$(echo ${url} | sed -e 's/http:\/\///1' -e 's/\//-/g' )
|
||||
|
@ -14,13 +14,13 @@ set -e -o pipefail
|
||||
|
||||
release=${1:-"alpha"}
|
||||
if [[ "$1" != http* ]]; then
|
||||
baseurl="http://${release}.release.core-os.net/amd64-usr/current"
|
||||
baseurl="https://${release}.release.core-os.net/amd64-usr/current"
|
||||
else
|
||||
# for this convoluded trick, we take an arbitrary URL, chop it up, and try
|
||||
# to turn it into usable input for the rest of the script.
|
||||
|
||||
# this is based on urls of the form:
|
||||
# http://storage.core-os.net/coreos/amd64-usr/master/version.txt
|
||||
# https://storage.core-os.net/coreos/amd64-usr/master/version.txt
|
||||
# where the following sed expression extracts the "master" portion
|
||||
baseurl="${1%/*}"
|
||||
release="${baseurl##*/}"
|
||||
|
Loading…
Reference in New Issue
Block a user