From 90ab179a526fa5d441e1a1e1b0096cb0b336054c Mon Sep 17 00:00:00 2001 From: j-hc Date: Mon, 3 Jun 2024 11:11:00 +0300 Subject: [PATCH] update customize.sh --- build.sh | 13 ++++++++++--- revanced-magisk/customize.sh | 5 ++--- utils.sh | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index cb61d72..888c559 100755 --- a/build.sh +++ b/build.sh @@ -146,17 +146,24 @@ for table_name in $(toml_get_table_names); do app_args[dpi]=$(toml_get "$t" apkmirror-dpi) || app_args[dpi]="nodpi" table_name_f=${table_name,,} table_name_f=${table_name_f// /-} - app_args[module_prop_name]=$(toml_get "$t" module-prop-name) || app_args[module_prop_name]="${table_name_f}-jhc" + app_args[module_prop_name]=$(toml_get "$t" module-prop-name) || { + app_args[module_prop_name]="${table_name_f}-jhc" + if [ "${app_args[arch]}" = "arm64-v8a" ]; then + app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" + elif [ "${app_args[arch]}" = "arm-v7a" ]; then + app_args[module_prop_name]="${app_args[module_prop_name]}-arm" + fi + } if [ "${app_args[arch]}" = both ]; then app_args[table]="$table_name (arm64-v8a)" - app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" app_args[arch]="arm64-v8a" + app_args[module_prop_name]="${app_args[module_prop_name]}-arm64" idx=$((idx + 1)) build_rv "$(declare -p app_args)" & app_args[table]="$table_name (arm-v7a)" - app_args[module_prop_name]="${app_args[module_prop_name]}-arm" app_args[arch]="arm-v7a" + app_args[module_prop_name]="${app_args[module_prop_name]}-arm" if ((idx >= PARALLEL_JOBS)); then wait -n; fi idx=$((idx + 1)) build_rv "$(declare -p app_args)" & diff --git a/revanced-magisk/customize.sh b/revanced-magisk/customize.sh index 04e70a9..1e00b9d 100755 --- a/revanced-magisk/customize.sh +++ b/revanced-magisk/customize.sh @@ -1,4 +1,3 @@ -#!/system/bin/sh . "$MODPATH/config" ui_print "" @@ -106,10 +105,10 @@ if [ $INS = true ]; then fi BASEPATHLIB=${BASEPATH}/lib/${ARCH} -if [ -z "$(ls -A1 "${BASEPATHLIB}")" ]; then +if [ -z "$(ls -A1 "$BASEPATHLIB")" ]; then ui_print "* Extracting native libs" mkdir -p "$BASEPATHLIB" - if ! op=$(unzip -j "$MODPATH/$PKG_NAME.apk lib/${ARCH_LIB}/"* -d "$BASEPATHLIB" 2>&1); then + 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 diff --git a/utils.sh b/utils.sh index cb111f2..90bd20c 100755 --- a/utils.sh +++ b/utils.sh @@ -435,7 +435,6 @@ build_rv() { elif [ "$arch" = "arm-v7a" ]; then patcher_args+=("--rip-lib arm64-v8a") fi - fi fi if [ ! -f "$patched_apk" ] || [ "$REBUILD" = true ]; then