mirror of
https://github.com/kou029w/yama.git
synced 2025-01-18 16:08:11 +00:00
use python3
This commit is contained in:
parent
c9a6081b17
commit
cc17e815e6
2 changed files with 8 additions and 9 deletions
|
@ -20,7 +20,7 @@ bin/img-gen
|
||||||
- Docker
|
- Docker
|
||||||
- Docker Compose
|
- Docker Compose
|
||||||
- qemu-user-static
|
- qemu-user-static
|
||||||
- awk, bash, curl, fallocate, grep, gzip, losetup, mkfs.fat, parted, ruby, ssh-keygen, tar, xargs
|
- awk, bash, curl, fallocate, grep, gzip, losetup, mkfs.fat, parted, python3, ssh-keygen, tar, xargs
|
||||||
|
|
||||||
### WiFi の設定
|
### WiFi の設定
|
||||||
|
|
||||||
|
|
15
bin/version
15
bin/version
|
@ -1,13 +1,12 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env python3
|
||||||
# 最新のバージョンを取得
|
# 最新のバージョンを取得
|
||||||
# Usage: bin/version
|
# Usage: bin/version
|
||||||
require "open-uri"
|
from urllib.request import urlopen
|
||||||
require "yaml"
|
import yaml
|
||||||
|
|
||||||
base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
|
base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
|
||||||
url = "#{base}/latest-releases.yaml"
|
url = f"{base}/latest-releases.yaml"
|
||||||
io = URI.open(url)
|
res = urlopen(url)
|
||||||
yaml = YAML.load(io)
|
version = yaml.safe_load(res)[0]["version"]
|
||||||
version = yaml.dig(0, "version")
|
|
||||||
|
|
||||||
puts version
|
print(version)
|
||||||
|
|
Loading…
Add table
Reference in a new issue