mirror of
https://github.com/kou029w/yama.git
synced 2025-01-19 00:18:06 +00:00
11 lines
373 B
Text
11 lines
373 B
Text
|
#!/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]+'
|