@@ -568,6 +568,7 @@ set_tool_paths() {
568568 aria2c=" $( command -v aria2c) "
569569 [[ -z $aria2c ]] && aria2c=" $dir /aria2c"
570570 aria2c+=" --download-result=hide"
571+ curl=" $( command -v curl) "
571572 futurerestore+=" $dir /futurerestore"
572573 ideviceactivation+=" $dir /ideviceactivation"
573574 idevicediagnostics+=" $dir /idevicediagnostics"
@@ -676,6 +677,7 @@ version_update_check() {
676677 log " Checking for updates..."
677678 rm -f latest
678679 $aria2c " https://api.github.com/repos/LukeZGD/Legacy-iOS-Kit/releases/latest"
680+ [[ $? != 0 ]] && $curl -LO " https://api.github.com/repos/LukeZGD/Legacy-iOS-Kit/releases/latest"
679681 github_api=$( cat latest 2> /dev/null)
680682 version_latest=$( echo " $github_api " | $jq -r ' .assets[] | select(.name|test("complete")) | .name' | cut -c 25- | cut -c -9)
681683 git_hash_latest=$( echo " $github_api " | $jq -r ' .assets[] | select(.name|test("git-hash")) | .name' | cut -c 21- | cut -c -7)
@@ -973,6 +975,7 @@ device_get_name() {
973975 log " Getting device name"
974976 rm -f tmp.json
975977 $aria2c " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/device/$device_type .json" -o tmp.json
978+ [[ $? != 0 ]] && $curl -L " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/device/$device_type .json" -o tmp.json
976979 device_name=" $( cat tmp.json | $jq -r " .name" ) "
977980 fi
978981}
@@ -1497,6 +1500,7 @@ device_get_info() {
14971500# log "Getting latest iOS version for $device_type"
14981501# rm -f tmp.json
14991502# $aria2c "https://api.ipsw.me/v4/device/$device_type?type=ipsw" -o tmp.json
1503+ # [[ $? != 0 ]] && $curl -L "https://api.ipsw.me/v4/device/$device_type?type=ipsw" -o tmp.json
15001504# local latestver="$(cat tmp.json | $jq -j ".firmwares[0]")"
15011505# device_latest_vers="$(echo "$latestver" | $jq -j ".version")"
15021506# device_latest_build="$(echo "$latestver" | $jq -j ".buildid")"
@@ -2236,6 +2240,7 @@ file_download() {
22362240 local filename=" $( basename $2 ) "
22372241 log " Downloading $filename ..."
22382242 $aria2c " $1 " -o $2
2243+ [[ $? != 0 ]] && $curl -L " $1 " -o $2
22392244 if [[ ! -s $2 ]]; then
22402245 error " Downloading $2 failed. Please run the script again"
22412246 fi
@@ -2273,6 +2278,7 @@ device_fw_key_check() {
22732278 for i in " ${try[@]} " ; do
22742279 log " Getting firmware keys for $device_type -$build : $i "
22752280 $aria2c " $i " -o index.html
2281+ [[ $? != 0 ]] && $curl -L " $i " -o index.html
22762282 if [[ $( cat index.html | grep -c " $build " ) == 1 ]]; then
22772283 break
22782284 fi
@@ -2326,6 +2332,7 @@ ipsw_get_url() {
23262332 fi
23272333 rm -f tmp.json
23282334 $aria2c " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/ios/i${phone} ;$build_id .json" -o tmp.json
2335+ [[ $? != 0 ]] && $curl -L " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/ios/i${phone} ;$build_id .json" -o tmp.json
23292336 url=" $( cat tmp.json | $jq -r " .sources[] | select(.type == \" ipsw\" and any(.deviceMap[]; . == \" $device_type \" )) | .links[0].url" ) "
23302337 local url2=" $( echo " $url " | tr ' [:upper:]' ' [:lower:]' ) "
23312338 local build_id2=" $( echo " $build_id " | tr ' [:upper:]' ' [:lower:]' ) "
@@ -2771,6 +2778,7 @@ ipsw_verify() {
27712778 fi
27722779 rm -f tmp.json
27732780 $aria2c " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/ios/i${phone} ;$build_id .json" -o tmp.json
2781+ [[ $? != 0 ]] && $curl -L " https://raw.githubusercontent.com/littlebyteorg/appledb/refs/heads/gh-pages/ios/i${phone} ;$build_id .json" -o tmp.json
27742782 IPSWSHA1=" $( cat tmp.json | $jq -r " .sources[] | select(.type == \" ipsw\" and any(.deviceMap[]; . == \" $device_type \" )) | .hashes.sha1" ) "
27752783 mkdir -p $device_fw_dir /$build_id 2> /dev/null
27762784
@@ -5128,6 +5136,7 @@ restore_futurerestore() {
51285136 log " Checking for futurerestore updates..."
51295137 # rm -f commits
51305138 # $aria2c "https://api.github.com/repos/futurerestore/futurerestore/commits"
5139+ # [[ $? != 0 ]] && $curl -LO "https://api.github.com/repos/futurerestore/futurerestore/commits"
51315140 # local fr_latest="$(cat commits | $jq -r '.[0].sha')"
51325141 local fr_latest=" 15f26141aaf1c980a5d5c44e429194d5225f531c"
51335142 local fr_branch=" main"
@@ -6743,6 +6752,7 @@ menu_ramdisk() {
67436752 log " Checking for latest TrollStore"
67446753 rm -f latest
67456754 $aria2c " https://api.github.com/repos/opa334/TrollStore/releases/latest"
6755+ [[ $? != 0 ]] && $curl -LO " https://api.github.com/repos/opa334/TrollStore/releases/latest"
67466756 local latest=" $( cat latest | $jq -r " .tag_name" ) "
67476757 local current=" $( cat ../saved/TrollStore_version 2> /dev/null || echo " none" ) "
67486758 log " Latest version: $latest , current version: $current "
@@ -7041,6 +7051,7 @@ shsh_convert_onboard() {
70417051shsh_save_cydia () {
70427052 rm -f tmp.json
70437053 $aria2c " https://api.ipsw.me/v4/device/${device_type} ?type=ipsw" -o tmp.json
7054+ [[ $? != 0 ]] && $curl -L " https://api.ipsw.me/v4/device/${device_type} ?type=ipsw" -o tmp.json
70447055 local json=$( cat tmp.json)
70457056 local len=$( echo " $json " | $jq -r " .firmwares | length" )
70467057 local builds=()
@@ -7400,6 +7411,7 @@ menu_fourthree() {
74007411 print " * FourThree Utility: Dualboot iPad 2 to iOS 4.3.x"
74017412 print " * This is a 3 step process for the device. Follow through the steps to successfully set up a dualboot."
74027413 print " * Please read the README here: https://github.com/LukeZGD/FourThree-iPad2"
7414+ warn " FourThree Utility is not supported. Any issues will not be entertained nor fixed."
74037415 echo
74047416 print " > Main Menu > FourThree Utility"
74057417 input " Select an option:"
@@ -7550,6 +7562,7 @@ device_sideloader() {
75507562 log " Checking for latest Sideloader"
75517563 rm -f latest
75527564 $aria2c " https://api.github.com/repos/LukeZGD/Sideloader/releases/latest"
7565+ [[ $? != 0 ]] && $curl -LO " https://api.github.com/repos/LukeZGD/Sideloader/releases/latest"
75537566 local latest=" $( cat latest | $jq -r " .tag_name" ) "
75547567 local current=" $( cat ../saved/Sideloader_version 2> /dev/null || echo " none" ) "
75557568 log " Latest version: $latest , current version: $current "
@@ -10012,6 +10025,7 @@ device_altserver() {
1001210025 log " Checking for latest anisette-server"
1001310026 rm -f latest
1001410027 $aria2c " https://api.github.com/repos/LukeZGD/Provision/releases/latest"
10028+ [[ $? != 0 ]] && $curl -LO " https://api.github.com/repos/LukeZGD/Provision/releases/latest"
1001510029 local latest=" $( cat latest | $jq -r " .tag_name" ) "
1001610030 local current=" $( cat ../saved/anisette-server_version 2> /dev/null || echo " none" ) "
1001710031 log " Latest version: $latest , current version: $current "
0 commit comments