Fix some small issues

This commit is contained in:
LukeZGD 2023-06-16 21:51:35 +08:00
parent 1aa4c5536e
commit 44dfa02784

View File

@ -486,7 +486,7 @@ device_get_info() {
device_ecid=$($ideviceinfo -s -k UniqueChipID) device_ecid=$($ideviceinfo -s -k UniqueChipID)
device_vers=$($ideviceinfo -s -k ProductVersion) device_vers=$($ideviceinfo -s -k ProductVersion)
device_udid=$($ideviceinfo -s -k UniqueDeviceID) device_udid=$($ideviceinfo -s -k UniqueDeviceID)
[[ -z $device_udid ]] && device_type=$($ideviceinfo -k UniqueDeviceID) [[ -z $device_udid ]] && device_udid=$($ideviceinfo -k UniqueDeviceID)
if [[ $device_type == "iPod2,1" ]]; then if [[ $device_type == "iPod2,1" ]]; then
device_newbr="$($ideviceinfo -k ModelNumber | grep -c 'C')" device_newbr="$($ideviceinfo -k ModelNumber | grep -c 'C')"
fi fi
@ -1225,6 +1225,10 @@ ipsw_preference_set() {
7* | 6* | 5* ) ipsw_canjailbreak=1;; 7* | 6* | 5* ) ipsw_canjailbreak=1;;
esac esac
if [[ $device_proc == 4 && $device_target_other == 1 && $ipsw_canjailbreak != 1 ]]; then
return
fi
if [[ $device_target_vers == "3.1.3" || $device_target_vers == "4.0" ]]; then if [[ $device_target_vers == "3.1.3" || $device_target_vers == "4.0" ]]; then
ipsw_jailbreak=1 ipsw_jailbreak=1
elif [[ $device_target_other != 1 && -z $ipsw_jailbreak ]] || [[ $ipsw_canjailbreak == 1 && -z $ipsw_jailbreak ]]; then elif [[ $device_target_other != 1 && -z $ipsw_jailbreak ]] || [[ $ipsw_canjailbreak == 1 && -z $ipsw_jailbreak ]]; then
@ -1278,7 +1282,7 @@ ipsw_preference_set() {
elif [[ -n $ipsw_memory ]]; then elif [[ -n $ipsw_memory ]]; then
: :
elif [[ $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]] && elif [[ $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]] &&
[[ $device_target_vers != "$device_latest_vers" || $device_target_vers == "4"* ]]; then [[ $device_target_vers != "$device_latest_vers" && $device_target_other != 1 ]]; then
: :
elif [[ $ipsw_jailbreak == 1 || $device_type == "$device_disable_bbupdate" ]] || elif [[ $ipsw_jailbreak == 1 || $device_type == "$device_disable_bbupdate" ]] ||
[[ $device_type == "iPhone3,1" && $device_target_vers != "7.1.2" ]] || [[ $device_type == "iPhone3,1" && $device_target_vers != "7.1.2" ]] ||