1
0
mirror of synced 2024-12-03 01:56:03 +03:00

Compare commits

..

2 Commits

Author SHA1 Message Date
hwdsl2
70d6ed41f9 Update tests 2023-06-15 00:14:11 -05:00
hwdsl2
e79e64174c Update OS check 2023-06-14 23:52:54 -05:00
4 changed files with 10 additions and 2 deletions

View File

@ -17,7 +17,7 @@ jobs:
if: github.repository_owner == 'hwdsl2' if: github.repository_owner == 'hwdsl2'
strategy: strategy:
matrix: matrix:
os_version: ["ubuntu:22.04", "ubuntu:20.04", "ubuntu:18.04", "debian:bookworm", "debian:11", "debian:10", "alpine:3.17", "alpine:3.16"] os_version: ["ubuntu:22.04", "ubuntu:20.04", "ubuntu:18.04", "debian:12", "debian:11", "debian:10", "alpine:3.17", "alpine:3.16"]
fail-fast: false fail-fast: false
container: container:
image: ${{ matrix.os_version }} image: ${{ matrix.os_version }}

View File

@ -93,6 +93,8 @@ check_os() {
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn os_type=amzn
os_ver=2 os_ver=2
elif grep -qs "Amazon Linux release 2023" /etc/system-release; then
exiterr "Amazon Linux 2023 is not supported."
else else
os_type=$(lsb_release -si 2>/dev/null) os_type=$(lsb_release -si 2>/dev/null)
[ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID") [ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID")

View File

@ -93,6 +93,8 @@ check_os() {
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn os_type=amzn
os_ver=2 os_ver=2
elif grep -qs "Amazon Linux release 2023" /etc/system-release; then
exiterr "Amazon Linux 2023 is not supported."
else else
os_type=$(lsb_release -si 2>/dev/null) os_type=$(lsb_release -si 2>/dev/null)
[ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID") [ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID")

View File

@ -54,8 +54,12 @@ check_root() {
check_os() { check_os() {
if ! grep -qs "Amazon Linux release 2 " /etc/system-release; then if ! grep -qs "Amazon Linux release 2 " /etc/system-release; then
if grep -qs "Amazon Linux release 2023" /etc/system-release; then
exiterr "Amazon Linux 2023 is not supported."
else
exiterr "This script only supports Amazon Linux 2." exiterr "This script only supports Amazon Linux 2."
fi fi
fi
} }
check_iface() { check_iface() {