mirror of
https://github.com/kou029w/megabit-os.git
synced 2025-01-19 00:08:00 +00:00
10 lines
373 B
Bash
Executable file
10 lines
373 B
Bash
Executable file
#!/bin/sh
|
|
# 最新のバージョンを取得
|
|
# Usage: bin/version
|
|
# Required: curl grep jq ruby
|
|
set -eu
|
|
base="http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
|
|
curl -s "${base}/latest-releases.yaml" \
|
|
| ruby -ryaml -rjson -e 'puts(YAML.load($<).to_json)' \
|
|
| jq -r '.[] | select(.title == "Raspberry Pi").file' \
|
|
| grep -Eo '[0-9]+\.[0-9]+\.[0-9]+'
|