Skip to content

Commit

Permalink
fix get_patch_last_supported_ver
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Nov 12, 2024
1 parent 16ea26d commit 3a6a30f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 10 additions & 9 deletions revanced-magisk/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@ install() {
done
settings put global verifier_verify_adb_installs "$VERIF_ADB"
}
if [ $INS = true ] && ! 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
ui_print "ERROR: extracting native libs failed"
abort "$op"
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 -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
set_perm_recursive "${BASEPATH}/lib" 1000 1000 755 755 u:object_r:apk_data_file:s0

ui_print "* Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0
Expand Down
7 changes: 5 additions & 2 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ 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")"
get_highest_ver <<<"$vers"
return
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'"
Expand Down

0 comments on commit 3a6a30f

Please sign in to comment.