mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-24 19:38:36 +09:00
🐛 Handle updated patch name
This commit is contained in:
@@ -55,7 +55,7 @@ jobs:
|
||||
json_data=$(cat "${path}")
|
||||
|
||||
new_object='{
|
||||
"patchName": "Change OAuth client id",
|
||||
"patchName": "Spoof client",
|
||||
"options": [
|
||||
{
|
||||
"key": "client-id",
|
||||
@@ -63,8 +63,8 @@ jobs:
|
||||
}
|
||||
]
|
||||
}'
|
||||
# Check if an object with the patchName "Change OAuth client id" already exists
|
||||
existing_object_index=$(echo "${json_data}" | jq 'map(.patchName) | index("Change OAuth client id")')
|
||||
# Check if an object with the patchName "Spoof client" already exists
|
||||
existing_object_index=$(echo "${json_data}" | jq 'map(.patchName) | index("Spoof client")')
|
||||
echo "${existing_object_index}"
|
||||
if [[ ${existing_object_index} != "null" ]]; then
|
||||
echo "Patch entry already exists. Overriding client ID in it."
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"patchName": "Change OAuth client id",
|
||||
"patchName": "Spoof client",
|
||||
"options": [
|
||||
{
|
||||
"key": "client-id",
|
||||
|
||||
@@ -6,7 +6,7 @@ path="apks/options.json"
|
||||
json_data=$(cat "${path}")
|
||||
|
||||
new_object='{
|
||||
"patchName": "Change OAuth client id",
|
||||
"patchName": "Spoof client",
|
||||
"options": [
|
||||
{
|
||||
"key": "client-id",
|
||||
@@ -14,8 +14,8 @@ new_object='{
|
||||
}
|
||||
]
|
||||
}'
|
||||
# Check if an object with the patchName "Change OAuth client id" already exists
|
||||
existing_object_index=$(echo "${json_data}" | jq 'map(.patchName) | index("Change OAuth client id")')
|
||||
# Check if an object with the patchName "Spoof client" already exists
|
||||
existing_object_index=$(echo "${json_data}" | jq 'map(.patchName) | index("Spoof client")')
|
||||
echo "${existing_object_index}"
|
||||
if [[ ${existing_object_index} != "null" ]]; then
|
||||
echo "Exist"
|
||||
|
||||
Reference in New Issue
Block a user