chore: {parse.sh, common.sh}: get_mb_ver -> mb_ver

shorter, why not?

Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
Hikarie Fukirei 2026-02-08 01:29:02 +07:00 • committed by Cuynu
commit 25fc723f4d
2 changed files with 5 additions and 7 deletions

View file

@ -93,7 +93,7 @@ pblock() {
echo "$1" > "$blocker"
}
get_mb_ver() {
mb_ver() {
[ -z "$1" ] && return 42
a="$(grep -m1 'android:versionName' "$DIRPATH"/mbapk/mbapk_unpacked/AndroidManifest.xml | tr ' ' '\n' | grep -m1 'android:versionName')"
a="$(bb_split "$a" '=' '1')"

View file

@ -87,9 +87,8 @@ for f in patches/*.sh ; do
minminor="$(bb_split "$minver" '.' '1')"
minpatch="$(bb_split "$minver" '.' '2')"
[ "$(( \
$(get_mb_ver 0) * 10000 + $(get_mb_ver 1) * 100 + $(get_mb_ver 2) ))" -lt \
"$(( minmajor * 10000 + minminor * 100 + minpatch ))" \
[ "$(( $(mb_ver 0) * 10000 + $(mb_ver 1) * 100 + $(mb_ver 2) ))" -lt \
"$(( minmajor * 10000 + minminor * 100 + minpatch ))" \
] && {
info "[parser] skipping [$pname] as current version is lower than patch version clamp"
continue ; }
@ -105,9 +104,8 @@ for f in patches/*.sh ; do
maxminor="$(bb_split "$maxver" '.' '1')"
maxpatch="$(bb_split "$maxver" '.' '2')"
[ "$(( \
$(get_mb_ver 0) * 10000 + $(get_mb_ver 1) * 100 + $(get_mb_ver 2) ))" -gt \
"$(( maxmajor * 10000 + maxminor * 100 + maxpatch ))" \
[ "$(( $(mb_ver 0) * 10000 + $(mb_ver 1) * 100 + $(mb_ver 2) ))" -gt \
"$(( maxmajor * 10000 + maxminor * 100 + maxpatch ))" \
] && {
info "[parser] skipping [$pname] as current version is higher than patch version clamp"
continue ; }