From d890c867da1a4d4dd91d4da715b22b43dfe1e530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=95?= <91324887+sasa8810@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:06:31 +0900 Subject: [PATCH] Update downr1n.sh --- downr1n.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/downr1n.sh b/downr1n.sh index 2b6815a..17b835a 100755 --- a/downr1n.sh +++ b/downr1n.sh @@ -558,13 +558,6 @@ fi ipswurl=$(curl -sL "https://api.ipsw.me/v4/device/$deviceid?type=ipsw" | "$dir"/jq '.firmwares | .[] | select(.version=="'$version'")' | "$dir"/jq -s '.[0] | .url' --raw-output) -if [ ! -e ipsw/*.ipsw ]; then - echo "[*] Downloading ipsw, it may take few minutes." - aria2c -x16 -s16 -j16 "$ipswurl" - mv *.ipsw ipsw -fi - -ipsw=$(ls ipsw/*.ipsw) # put your ipsw # Have the user put the device into DFU if [ "$(get_device_mode)" != "dfu" ]; then @@ -583,6 +576,16 @@ fi # ========= # extract ipsw # ========= + +if [ ! -e ipsw/*.ipsw ]; then + echo "[*] Downloading ipsw, it may take few minutes." + aria2c -x16 -s16 -j16 "$ipswurl" + mv *.ipsw ipsw +fi + +ipsw=$(ls ipsw/*.ipsw) # put your ipsw + + cd ipsw/ ipsw_files=(*.ipsw) if [[ ${#ipsw_files[@]} -gt 1 ]]; then