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 Compose
|
||||
- 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 の設定
|
||||
|
||||
|
|
15
bin/version
15
bin/version
|
@ -1,13 +1,12 @@
|
|||
#!/usr/bin/env ruby
|
||||
#!/usr/bin/env python3
|
||||
# 最新のバージョンを取得
|
||||
# Usage: bin/version
|
||||
require "open-uri"
|
||||
require "yaml"
|
||||
from urllib.request import urlopen
|
||||
import yaml
|
||||
|
||||
base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf"
|
||||
url = "#{base}/latest-releases.yaml"
|
||||
io = URI.open(url)
|
||||
yaml = YAML.load(io)
|
||||
version = yaml.dig(0, "version")
|
||||
url = f"{base}/latest-releases.yaml"
|
||||
res = urlopen(url)
|
||||
version = yaml.safe_load(res)[0]["version"]
|
||||
|
||||
puts version
|
||||
print(version)
|
||||
|
|
Loading…
Add table
Reference in a new issue