mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
An update
This commit is contained in:
parent
6da11b92e9
commit
e8e4cabd7a
@ -288,7 +288,7 @@ EnterPwnDFU() {
|
||||
elif [[ $pwnDFUDevice == 0 ]]; then
|
||||
Log "Device in pwnDFU mode detected."
|
||||
else
|
||||
Log "Warning - Failed to detect device in pwnDFU mode."
|
||||
Log "WARNING - Failed to detect device in pwnDFU mode."
|
||||
Echo "* If the device entered pwnDFU mode successfully, you may continue"
|
||||
Echo "* If entering pwnDFU failed, you may have to force restart your device and start over"
|
||||
Input "Press Enter/Return to continue (or press Ctrl+C to cancel)"
|
||||
|
@ -116,7 +116,7 @@ DowngradeOther() {
|
||||
if [[ $(cat tmp/index.html | grep -c "$BuildVer") != 1 ]]; then
|
||||
curl -L https://api.m1sta.xyz/wikiproxy/$ProductType/$BuildVer -o tmp/index.html
|
||||
if [[ $(cat tmp/index.html | grep -c "$BuildVer") != 1 ]]; then
|
||||
Log "Warning - Failed to download firmware keys."
|
||||
Log "WARNING - Failed to download firmware keys."
|
||||
NoMove=1
|
||||
fi
|
||||
fi
|
||||
|
37
restore.sh
37
restore.sh
@ -82,24 +82,6 @@ Main() {
|
||||
"If resources folder is present try removing spaces from path/folder name"
|
||||
fi
|
||||
|
||||
if [[ -d .git ]]; then
|
||||
if [[ $platform == "macos" ]]; then
|
||||
CurrentVersion="$(date -r $(git log -1 --format="%at") +%Y-%m-%d)-$(git rev-parse HEAD | cut -c -7)"
|
||||
else
|
||||
CurrentVersion="$(date -d @$(git log -1 --format="%at") --rfc-3339=date)-$(git rev-parse HEAD | cut -c -7)"
|
||||
fi
|
||||
Echo "Version: $CurrentVersion"
|
||||
elif [[ -e resources/git_hash ]]; then
|
||||
CurrentVersion="$(cat resources/git_hash)"
|
||||
Echo "Version: $CurrentVersion"
|
||||
else
|
||||
Echo "Version: Unknown"
|
||||
if [[ $NoVersionCheck != 1 ]]; then
|
||||
Error "git_hash or .git not found. Your copy of iOS-OTA-Downgrader is downloaded incorrectly." \
|
||||
"Please download iOS-OTA-Downgrader from the GitHub releases page or using git clone."
|
||||
fi
|
||||
fi
|
||||
|
||||
SetToolPaths
|
||||
if [[ $? != 0 ]]; then
|
||||
Error "Setting tool paths failed. Your copy of iOS-OTA-Downgrader seems to be incomplete."
|
||||
@ -109,6 +91,23 @@ Main() {
|
||||
Error "Platform unknown/not supported."
|
||||
fi
|
||||
|
||||
if [[ -d .git ]]; then
|
||||
if [[ $platform == "macos" ]]; then
|
||||
CurrentVersion="$(date -r $(git log -1 --format="%at") +%Y-%m-%d)-$(git rev-parse HEAD | cut -c -7)"
|
||||
else
|
||||
CurrentVersion="$(date -d @$(git log -1 --format="%at") --rfc-3339=date)-$(git rev-parse HEAD | cut -c -7)"
|
||||
fi
|
||||
elif [[ -e resources/git_hash ]]; then
|
||||
CurrentVersion="$(cat resources/git_hash)"
|
||||
else
|
||||
Echo "* Version: Unknown"
|
||||
if [[ $NoVersionCheck != 1 ]]; then
|
||||
Error "git_hash or .git not found. Your copy of iOS-OTA-Downgrader is downloaded incorrectly." \
|
||||
"Please download iOS-OTA-Downgrader from the GitHub releases page or using git clone."
|
||||
fi
|
||||
fi
|
||||
[[ -n $CurrentVersion ]] && Echo "* Version: $CurrentVersion"
|
||||
|
||||
chmod +x ./resources/*.sh ./resources/tools/*
|
||||
if [[ $? != 0 ]]; then
|
||||
Error "A problem with file permissions has been detected, cannot proceed."
|
||||
@ -134,7 +133,7 @@ Main() {
|
||||
Echo "* A newer version of iOS-OTA-Downgrader is available."
|
||||
Echo "* Current version: $CurrentVersion"
|
||||
Echo "* Latest version: $LatestVersion"
|
||||
Echo "* Please download the latest version before continuing."
|
||||
Echo "* Please download/pull the latest version before continuing."
|
||||
ExitWin 0
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user