Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit a1d77b9

Browse files
committed
fix: add regex to remove Android Automative suffix
1 parent cc309f1 commit a1d77b9

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

modules/json/apps.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,20 @@ fetchAppsInfo() {
5656
[];
5757
. += [{
5858
"pkgName": $PKG_NAME,
59-
"appName": ($APP_NAME | sub("( -)|( &)|:"; ""; "g") | sub("[()\\|]"; ""; "g") | sub(" *[-, ] *"; "-"; "g") | sub("-Wear-OS"; ""; "g")) | split("-")[:4] | join("-"),
60-
"apkmirrorAppName": ($APP_URL | sub("-wear-os"; "") | match("(?<=\\/)(((?!\\/).)*)(?=\\/$)").string),
59+
"appName": (
60+
$APP_NAME |
61+
sub("( -)|( &amp;)|:"; ""; "g") |
62+
sub("[()\\|]"; ""; "g") |
63+
sub(" *[-, ] *"; "-"; "g") |
64+
sub("-Wear-OS|-Android-Automotive"; ""; "g")
65+
) |
66+
split("-")[:4] |
67+
join("-"),
68+
"apkmirrorAppName": (
69+
$APP_URL |
70+
sub("-wear-os|-android-automotive"; "") |
71+
match("(?<=\\/)(((?!\\/).)*)(?=\\/$)").string
72+
),
6173
}]
6274
)
6375
' > "assets/$SOURCE/Apps-$PATCHES_VERSION.json" \

0 commit comments

Comments
 (0)