summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-12-02 15:59:10 +0100
committerKarel Kočí <karel.koci@nic.cz>2019-12-02 15:59:10 +0100
commit012049df080aca7d676bfddbfce98430c478cfb1 (patch)
tree38c55504d6bcbb5dc6909287b2edcca4d845a3f8 /templates
parentce6be2d4d764533de7c9040c797d9ad307cf7ac7 (diff)
downloadlaminar-cnf-012049df080aca7d676bfddbfce98430c478cfb1.tar.gz
laminar-cnf-012049df080aca7d676bfddbfce98430c478cfb1.tar.bz2
laminar-cnf-012049df080aca7d676bfddbfce98430c478cfb1.zip
templates/alpine.run: download latest rootfs
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/alpine.run5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/alpine.run b/templates/alpine.run
index bba82ad..b0d61fd 100755
--- a/templates/alpine.run
+++ b/templates/alpine.run
@@ -27,9 +27,10 @@ mkdir -p "$TWORKSPACE/distfiles" "$WORKSPACE/packages"
if [ ! -d "$ROOT" ]; then
# Prepare new root if there is none
- # TODO get latest uri from latest-releases.yml file
+ rootfs="$(curl http://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/latest-releases.yaml | \
+ yq -r 'map(select(.flavor == "alpine-minirootfs")) | .[0].file')"
echo_stage "Setting up new root"
- wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/alpine-minirootfs-3.9.0-$ARCH.tar.gz" -O alpine.tar.gz
+ wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/$rootfs" -O alpine.tar.gz
# TODO verify signature
gunzip alpine.tar.gz # tar is not able to change compressed files
tar -f alpine.tar --delete ./dev/null