mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-06-13 05:37:48 +02:00
change tiktok pkg name to com.zhiliaoapp.musically
This commit is contained in:
9
semver
9
semver
@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#github.com/fsaintjacques/semver-tool
|
||||
|
||||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
NAT='0|[1-9][0-9]*'
|
||||
ALPHANUM='[0-9]*[A-Za-z-][0-9A-Za-z-]*'
|
||||
IDENT="$NAT|$ALPHANUM"
|
||||
@ -68,16 +66,13 @@ function compare_fields {
|
||||
local rightfield=("${!r}")
|
||||
local left
|
||||
local right
|
||||
|
||||
local i=$((-1))
|
||||
local order=$((0))
|
||||
|
||||
while true; do
|
||||
[ $order -ne 0 ] && {
|
||||
echo $order
|
||||
return
|
||||
}
|
||||
|
||||
: $((i++))
|
||||
left="${leftfield[$i]}"
|
||||
right="${rightfield[$i]}"
|
||||
@ -94,7 +89,6 @@ function compare_fields {
|
||||
echo 1
|
||||
return
|
||||
}
|
||||
|
||||
is_nat "$left" && is_nat "$right" && {
|
||||
order=$(order_nat "$left" "$right")
|
||||
continue
|
||||
@ -153,7 +147,4 @@ function command_compare {
|
||||
v_=$(validate_version "$2")
|
||||
set +u
|
||||
compare_version "$v" "$v_"
|
||||
exit 0
|
||||
}
|
||||
|
||||
command_compare "$@"
|
||||
|
10
utils.sh
10
utils.sh
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source semver
|
||||
|
||||
MODULE_TEMPLATE_DIR="revanced-magisk"
|
||||
MODULE_SCRIPTS_DIR="scripts"
|
||||
TEMP_DIR="temp"
|
||||
@ -95,7 +97,7 @@ get_apk_vers() { req "https://www.apkmirror.com/uploads/?appcategory=${1}" - | s
|
||||
get_largest_ver() {
|
||||
local max=0
|
||||
while read -r v || [ -n "$v" ]; do
|
||||
if [ "$(./semver "$v" "$max")" = 1 ]; then max=$v; fi
|
||||
if [ "$(command_compare "$v" "$max")" = 1 ]; then max=$v; fi
|
||||
done
|
||||
if [[ $max = 0 ]]; then echo ""; else echo "$max"; fi
|
||||
}
|
||||
@ -315,10 +317,10 @@ build_tiktok() {
|
||||
tiktok_args[app_name]="TikTok"
|
||||
tiktok_args[is_module]=false
|
||||
tiktok_args[patcher_args]="-r"
|
||||
tiktok_args[apkmirror_category]="tik-tok"
|
||||
tiktok_args[apkmirror_category]="tik-tok-including-musical-ly"
|
||||
tiktok_args[arch]="all"
|
||||
tiktok_args[pkg_name]="com.ss.android.ugc.trill"
|
||||
tiktok_args[apkmirror_dlurl]="tiktok-pte-ltd/tik-tok/tik-tok"
|
||||
tiktok_args[pkg_name]="com.zhiliaoapp.musically"
|
||||
tiktok_args[apkmirror_dlurl]="tiktok-pte-ltd/tik-tok-including-musical-ly/tik-tok-including-musical-ly"
|
||||
#shellcheck disable=SC2034
|
||||
tiktok_args[regexp]="APK</span>[^@]*@\([^#]*\)"
|
||||
|
||||
|
Reference in New Issue
Block a user