From 7f6f18a76a9d99be9555dbeaa062ccd5f5848ae1 Mon Sep 17 00:00:00 2001 From: Nebula Date: Wed, 5 Oct 2022 19:27:06 -0400 Subject: [PATCH] edit beta url --- palera1n.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/palera1n.sh b/palera1n.sh index 50d0b84..02a1d7b 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -134,6 +134,13 @@ _kill_if_running() { fi } +_beta_url() { + json=$(curl -s https://raw.githubusercontent.com/littlebyteorg/appledb/main/osFiles/iOS/19x%20-%2015.x/19B5060d.json) + sources=$(echo "$json" | $dir/jq -r '.sources') + beta_url=$(echo "$sources" | $dir/jq -r --arg deviceid "$deviceid" '.[] | select(.type == "ota" and (.deviceMap | index($deviceid))) | .links[0].url') + echo "$beta_url" +} + _exit_handler() { if [ "$os" = 'Darwin' ]; then if [ ! "$1" = '--dfu' ]; then @@ -151,25 +158,10 @@ _exit_handler() { done cd .. - if [[ "$@" == *"--debug"* ]]; then - echo "[*] A failure log has been made. If you're going to make a GitHub issue, please attatch the latest log." - else - echo "[*] A failure log has been made, but you aren't running with --debug. DO NOT send this in a GitHub issue." - fi + echo "[*] A failure log has been made. If you're going to make a GitHub issue, please attach the latest log." } trap _exit_handler EXIT -# ========= -# Json parser -# ========= -# get beta url -_beta_url() { - json=$(curl -s https://raw.githubusercontent.com/littlebyteorg/appledb/main/iosFiles/iOS/19x%20-%2015.x/19B5060d.json) - sources=$(echo "$json" | $dir/jq -r '.sources') - beta_url=$(echo "$sources" | $dir/jq -r --arg deviceid "$deviceid" '.[] | select(.type == "ota" and (.deviceMap | index($deviceid))) | .links[0].url') - echo "$beta_url" -} - # =========== # Fixes # ===========