Merge pull request #44 from sasa8810/main

update ipsw downloader to use curl
This commit is contained in:
Edwin Nuñez 2023-09-15 10:54:06 -04:00 committed by GitHub
commit 3e385336f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 9 deletions

13
.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
.DS_Store
*/.DS_Store
binaries/Linux/futurerestore
binaries/Darwin/futurerestore
work
ramdisk
boot*
.irecovery
blobs
logs
.rd_in_progress
logs
.disclaimeragree

View file

@ -650,16 +650,12 @@ fi
# extract ipsw
# =========
# sasa please update your downloader to use wget
#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
if [ ! -e "ipsw/*.ipsw" ]; then
echo "[*] Downloading ipsw, it may take few minutes."
curl -Lo ipsw/$deviceid-$version.ipsw "$ipswurl" "-#"
fi
cd ipsw/
ipsw_files=(*.ipsw)
if [[ ${#ipsw_files[@]} -gt 1 ]]; then
@ -669,6 +665,8 @@ if [[ ${#ipsw_files[@]} -gt 1 ]]; then
fi
cd ..
ipsw=$(ls ipsw/*.ipsw) # put your ipsw
if [ -a $ipsw ] || [ "${ipsw: -5}" == ".ipsw" ]; then
echo "[*] Continuing..."
else