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:
parent
0321f71fb0
commit
1e07a99f7b
2 changed files with 5 additions and 7 deletions
|
|
@ -118,7 +118,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')"
|
||||
|
|
|
|||
|
|
@ -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 ; }
|
||||
|
|
|
|||
Reference in a new issue