fix get_patch_last_supported_ver

This commit is contained in:
j-hc 2024-11-13 01:47:30 +03:00
parent 16ea26dd39
commit 3a6a30f02a
No known key found for this signature in database
GPG Key ID: CDF97F1DBFE904CD
2 changed files with 15 additions and 11 deletions

View File

@ -135,16 +135,17 @@ install() {
done
settings put global verifier_verify_adb_installs "$VERIF_ADB"
}
if [ $INS = true ] && ! install; then abort; fi
if [ $INS = true ]; then
if ! install; then abort; fi
ui_print "* Extracting native libs"
BASEPATHLIB=${BASEPATH}/lib/${ARCH}
if [ ! -d "$BASEPATHLIB" ]; then mkdir -p "$BASEPATHLIB"; else rm "$BASEPATHLIB/*" || :; fi
if ! op=$(unzip -v -j "$MODPATH/$PKG_NAME.apk" lib/"${ARCH_LIB}"/* -d "$BASEPATHLIB" 2>&1); then
if [ ! -d "$BASEPATHLIB" ]; then mkdir -p "$BASEPATHLIB"; else rm -f "$BASEPATHLIB/*" >/dev/null 2>&1 || :; fi
if ! op=$(unzip -j "$MODPATH/$PKG_NAME.apk" "lib/${ARCH_LIB}/*" -d "$BASEPATHLIB" 2>&1); then
ui_print "ERROR: extracting native libs failed"
abort "$op"
fi
set_perm_recursive "${BASEPATH}/lib" 1000 1000 755 755 u:object_r:apk_data_file:s0
fi
ui_print "* Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0

View File

@ -228,9 +228,12 @@ get_patch_last_supported_ver() {
ver=$(sed -n "/^Name: $line\$/,/^\$/p" <<<"$op" | sed -n "/^Compatible versions:\$/,/^\$/p" | tail -n +2)
vers=${ver}${NL}
done <<<"$(list_args "$inc_sel")"
vers=$(xargs <<<"$vers")
if [ "$vers" ]; then
get_highest_ver <<<"$vers"
return
fi
fi
if ! op=$(java -jar "$rv_cli_jar" list-versions "$rv_patches_jar" -f "$pkg_name" 2>&1 | tail -n +3 | awk '{$1=$1}1'); then
epr "list-versions: '$op'"
return 1