perl: fix version check in test-version.sh
authorJosef Schlehofer <redacted>
Sun, 7 Jun 2026 20:06:31 +0000 (22:06 +0200)
committerPhilip Prindeville <redacted>
Sun, 7 Jun 2026 23:17:41 +0000 (17:17 -0600)
Enable version checking for the main perl package.
Previously, the version check for perl was skipped. Add a check
that runs perl -v and verifies that the output matches PKG_VERSION.

Signed-off-by: Josef Schlehofer <redacted>
lang/perl/test-version.sh

index 3e80556a972d55b7ceb9de679f1304eb297df45f..2920cae615c38487851df89da0cd9005bbd84f79 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/sh
-# Perl script wrappers do not output the OpenWrt package version string
-case "$1" in
-       perlbase-archive|perlbase-pod|perlbase-test) exit 0 ;;
+case "$PKG_NAME" in
+perl)
+       perl -v 2>&1 | grep -q "v$PKG_VERSION"
+       ;;
+perlbase-archive|perlbase-pod|perlbase-test)
+       # Perl script wrappers do not output the OpenWrt package version string
+       exit 0
+       ;;
 esac
git clone https://git.99rst.org/PROJECT