mirror of
https://github.com/openwrt/packages.git
synced 2026-10-13 03:37:43 +04:00
Remove the quiet mode flag (-q) from grep in version check commands to ensure that their stdout output is visible. While at it, switch the remaining regex matches (perl, sscep, awscli) to fixed-string matching where appropriate, so that special characters in the version string are matched literally. For libzip, the zipcmp and zipmerge branches ran grep and then unconditionally exited 0, so a version mismatch was never reported and the version check override always passed. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
31 lines
393 B
Bash
Executable File
31 lines
393 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# shellcheck shell=busybox
|
|
|
|
case "$PKG_NAME" in
|
|
libzip-*)
|
|
# library packages
|
|
exit 0
|
|
;;
|
|
|
|
zipcmp)
|
|
zipcmp -V 2>&1 | grep -F "libzip $PKG_VERSION" || exit 1
|
|
exit 0
|
|
;;
|
|
|
|
zipmerge)
|
|
zipmerge -V 2>&1 | grep -F "libzip $PKG_VERSION" || exit 1
|
|
exit 0
|
|
;;
|
|
|
|
ziptool)
|
|
# does not provide -V or prints version on -h
|
|
exit 0
|
|
;;
|
|
|
|
*)
|
|
echo "Untested package: $PKG_NAME" >&2
|
|
exit 1
|
|
;;
|
|
esac
|