20 lines
716 B
Bash
20 lines
716 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
source "$(dirname "$0")/native-platform.sh"
|
|
check() {
|
|
local want=$1; shift
|
|
if require_native_platform "$@" >/dev/null 2>&1; then
|
|
[[ $want == pass ]] || { echo "unexpected pass: $*" >&2; exit 1; }
|
|
else
|
|
[[ $want == fail ]] || { echo "unexpected reject: $*" >&2; exit 1; }
|
|
fi
|
|
}
|
|
check pass debian 13 x86_64 debian:13:x86_64 0
|
|
check pass debian 12 x86_64 debian:12:x86_64 1
|
|
check fail debian 12 x86_64 debian:12:x86_64 0
|
|
check fail debian 12 x86_64 debian:13:x86_64 1
|
|
check fail debian 13 x86_64 debian:12:x86_64 1
|
|
check fail debian 12 aarch64 debian:12:aarch64 1
|
|
check fail ubuntu 24.04 x86_64 ubuntu:24.04:x86_64 1
|
|
printf 'native Asterisk platform checks passed\n'
|