mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 05:57:04 +04:00
Apparently the CI wants to 'see' the version not just get a return code, so emit the version when we have one. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
32 lines
532 B
Bash
32 lines
532 B
Bash
#!/bin/sh
|
|
|
|
if [ "$PKG_NAME" = "nut" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
EXEC="${PKG_NAME#nut-}"
|
|
|
|
case "$EXEC" in
|
|
common | upsmon-sendmail-notify | avahi-service)
|
|
exit 0
|
|
;;
|
|
driver-*)
|
|
DRIVER="${EXEC#driver-}"
|
|
/usr/libexec/nut/"$DRIVER" -V 2>&1 | grep -F "${PKG_VERSION}"
|
|
;;
|
|
server)
|
|
"upsd" -V 2>&1 | grep -F "${PKG_VERSION}" && "upsdrvctl" -V 2>&1 | grep -F "${PKG_VERSION}"
|
|
;;
|
|
upssched)
|
|
# Only intended to be run from upsmon
|
|
exit 0
|
|
;;
|
|
web-cgi)
|
|
# Only runs as CGI scripts
|
|
exit 0
|
|
;;
|
|
*)
|
|
"$EXEC" -V 2>&1 | grep -F "${PKG_VERSION}"
|
|
;;
|
|
esac
|