From: Michael Heimpold Date: Tue, 13 May 2025 05:33:11 +0000 (+0200) Subject: php8: adapt test.sh for upcoming opkg -> apk transition X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f21bc7f170da725285a9d017b98c8da8869ec327;p=openwrt-packages.git php8: adapt test.sh for upcoming opkg -> apk transition We used to rely on opkg to install the CLI tool for testing PHP modules, but when opkg is not available anymore, we have to use apk. The (simple) switch logic assumes, that only one of both package manager tools is installed. Signed-off-by: Michael Heimpold --- diff --git a/lang/php8/test.sh b/lang/php8/test.sh index 7b2de6ee7..bfa3fefd6 100644 --- a/lang/php8/test.sh +++ b/lang/php8/test.sh @@ -14,7 +14,11 @@ case "$1" in PHP_MOD="${1#php8-mod-}" PHP_MOD="${PHP_MOD//-/_}" - opkg install php8-cli + if command -v opkg >/dev/null 2>&1; then + opkg install php8-cli + else + apk add php8-cli + fi php8-cli -m | grep -i "$PHP_MOD" ;;