mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 10:39:48 +02:00
allow url's to ipsw's to be specified
This commit is contained in:
1 parent
e40ae8ce89
commit
e4940ab3b5
1 file changed
+6
-1
+6
-1
@@ -139,7 +139,12 @@ echo "[*] Getting device info..."
|
||||
cpid=$("$dir"/irecovery -q | grep CPID | sed 's/CPID: //')
|
||||
model=$("$dir"/irecovery -q | grep MODEL | sed 's/MODEL: //')
|
||||
deviceid=$("$dir"/irecovery -q | grep PRODUCT | sed 's/PRODUCT: //')
|
||||
ipswurl=$(curl -sL "https://api.ipsw.me/v4/device/$deviceid?type=ipsw" | "$dir"/jq '.firmwares | .[] | select(.version=="'"$version"'") | .url' --raw-output)
|
||||
# if the version variable is an url, use that instead
|
||||
if [[ "$version" == http* ]]; then
|
||||
ipswurl=$version
|
||||
else
|
||||
ipswurl=$(curl -sL "https://api.ipsw.me/v4/device/$deviceid?type=ipsw" | "$dir"/jq '.firmwares | .[] | select(.version=="'"$version"'") | .url' --raw-output)
|
||||
fi
|
||||
|
||||
# Have the user put the device into DFU
|
||||
if [ ! "$2" = '--dfu' ]; then
|
||||
|
||||
Reference in new issue
Block a user