rootfs/clearlinux: Resolve version

If the Clear Linux `OS_VERSION` is specified as `latest`,
resolve to an actual release number.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2018-04-19 16:30:11 +01:00
parent a2a65621a1
commit 5b6ced536b

View File

@ -4,12 +4,16 @@
# SPDX-License-Identifier: Apache-2.0
OS_NAME="Clear"
REPO_NAME="clear"
OS_VERSION=${OS_VERSION:-latest}
BASE_URL="https://download.clearlinux.org/current/${ARCH}/os/"
clr_url="https://download.clearlinux.org"
REPO_NAME="clear"
# resolve version
[ "${OS_VERSION}" = "latest" ] && OS_VERSION=$(curl -sL "${clr_url}/latest")
BASE_URL="${clr_url}/releases/${OS_VERSION}/${REPO_NAME}/${ARCH}/os/"
PACKAGES="iptables-bin libudev0-shim"