option to fetch a security patch date

This commit is contained in:
KOWX712
2025-02-18 18:05:10 +08:00
parent 581d81d5dd
commit c44a101776
14 changed files with 56 additions and 5 deletions

View File

@@ -153,6 +153,11 @@ set_security_patch() {
fi
}
get_latest_security_patch() {
security_patch=$(download --fetch https://source.android.com/docs/security/bulletin/pixel | grep -o "<td>[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}</td>" | head -n 1 | sed 's/<td>\(.*\)<\/td>/\1/')
[ -n "$security_patch" ] && echo "$security_patch" || exit 1
}
case "$1" in
--kb)
get_kb
@@ -190,4 +195,8 @@ case "$1" in
set_security_patch
exit
;;
--get-security-patch)
get_latest_security_patch
exit
;;
esac