mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-03-22 12:43:36 +00:00
25 lines
873 B
Bash
Executable File
25 lines
873 B
Bash
Executable File
#!/bin/bash -e
|
|
# USAGE: ./get-coreos
|
|
# USAGE: ./get-coreos beta 877.1.0
|
|
|
|
CHANNEL=${1:-"stable"}
|
|
VERSION=${2:-"835.9.0"}
|
|
DEST=${PWD}/images/coreos/$VERSION
|
|
|
|
mkdir -p $DEST
|
|
echo "Downloading CoreOS kernel and initrd"
|
|
|
|
# kernel and sig
|
|
BASE_URL=http://$CHANNEL.release.core-os.net/amd64-usr/$VERSION
|
|
curl $BASE_URL/coreos_production_pxe.vmlinuz -o $DEST/coreos_production_pxe.vmlinuz
|
|
curl $BASE_URL/coreos_production_pxe.vmlinuz.sig -o $DEST/coreos_production_pxe.vmlinuz.sig
|
|
|
|
# initrd and sig
|
|
curl $BASE_URL/coreos_production_pxe_image.cpio.gz -o $DEST/coreos_production_pxe_image.cpio.gz
|
|
curl $BASE_URL/coreos_production_pxe_image.cpio.gz.sig -o $DEST/coreos_production_pxe_image.cpio.gz.sig
|
|
|
|
# verify signatures
|
|
# https://coreos.com/security/image-signing-key/
|
|
gpg --verify $DEST/coreos_production_pxe.vmlinuz.sig
|
|
gpg --verify $DEST/coreos_production_pxe_image.cpio.gz.sig
|