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
9d5f548050
commit
a45bcb42be
2 changed files with 5 additions and 7 deletions
|
|
@ -126,7 +126,7 @@ pblock() {
|
||||||
echo "$1" > "$blocker"
|
echo "$1" > "$blocker"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_mb_ver() {
|
mb_ver() {
|
||||||
[ -z "$1" ] && return 42
|
[ -z "$1" ] && return 42
|
||||||
a="$(grep -m1 'android:versionName' "$DIRPATH"/mbapk/mbapk_unpacked/AndroidManifest.xml | tr ' ' '\n' | grep -m1 'android:versionName')"
|
a="$(grep -m1 'android:versionName' "$DIRPATH"/mbapk/mbapk_unpacked/AndroidManifest.xml | tr ' ' '\n' | grep -m1 'android:versionName')"
|
||||||
a="$(bb_split "$a" '=' '1')"
|
a="$(bb_split "$a" '=' '1')"
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,8 @@ for f in patches/*.sh ; do
|
||||||
minminor="$(bb_split "$minver" '.' '1')"
|
minminor="$(bb_split "$minver" '.' '1')"
|
||||||
minpatch="$(bb_split "$minver" '.' '2')"
|
minpatch="$(bb_split "$minver" '.' '2')"
|
||||||
|
|
||||||
[ "$(( \
|
[ "$(( $(mb_ver 0) * 10000 + $(mb_ver 1) * 100 + $(mb_ver 2) ))" -lt \
|
||||||
$(get_mb_ver 0) * 10000 + $(get_mb_ver 1) * 100 + $(get_mb_ver 2) ))" -lt \
|
"$(( minmajor * 10000 + minminor * 100 + minpatch ))" \
|
||||||
"$(( minmajor * 10000 + minminor * 100 + minpatch ))" \
|
|
||||||
] && {
|
] && {
|
||||||
info "[parser] skipping [$pname] as current version is lower than patch version clamp"
|
info "[parser] skipping [$pname] as current version is lower than patch version clamp"
|
||||||
continue ; }
|
continue ; }
|
||||||
|
|
@ -105,9 +104,8 @@ for f in patches/*.sh ; do
|
||||||
maxminor="$(bb_split "$maxver" '.' '1')"
|
maxminor="$(bb_split "$maxver" '.' '1')"
|
||||||
maxpatch="$(bb_split "$maxver" '.' '2')"
|
maxpatch="$(bb_split "$maxver" '.' '2')"
|
||||||
|
|
||||||
[ "$(( \
|
[ "$(( $(mb_ver 0) * 10000 + $(mb_ver 1) * 100 + $(mb_ver 2) ))" -gt \
|
||||||
$(get_mb_ver 0) * 10000 + $(get_mb_ver 1) * 100 + $(get_mb_ver 2) ))" -gt \
|
"$(( maxmajor * 10000 + maxminor * 100 + maxpatch ))" \
|
||||||
"$(( maxmajor * 10000 + maxminor * 100 + maxpatch ))" \
|
|
||||||
] && {
|
] && {
|
||||||
info "[parser] skipping [$pname] as current version is higher than patch version clamp"
|
info "[parser] skipping [$pname] as current version is higher than patch version clamp"
|
||||||
continue ; }
|
continue ; }
|
||||||
|
|
|
||||||
Reference in a new issue