mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-24 00:49:17 +01:00
An update
This commit is contained in:
parent
6da11b92e9
commit
e8e4cabd7a
@ -288,7 +288,7 @@ EnterPwnDFU() {
|
|||||||
elif [[ $pwnDFUDevice == 0 ]]; then
|
elif [[ $pwnDFUDevice == 0 ]]; then
|
||||||
Log "Device in pwnDFU mode detected."
|
Log "Device in pwnDFU mode detected."
|
||||||
else
|
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 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"
|
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)"
|
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
|
if [[ $(cat tmp/index.html | grep -c "$BuildVer") != 1 ]]; then
|
||||||
curl -L https://api.m1sta.xyz/wikiproxy/$ProductType/$BuildVer -o tmp/index.html
|
curl -L https://api.m1sta.xyz/wikiproxy/$ProductType/$BuildVer -o tmp/index.html
|
||||||
if [[ $(cat tmp/index.html | grep -c "$BuildVer") != 1 ]]; then
|
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
|
NoMove=1
|
||||||
fi
|
fi
|
||||||
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"
|
"If resources folder is present try removing spaces from path/folder name"
|
||||||
fi
|
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
|
SetToolPaths
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
Error "Setting tool paths failed. Your copy of iOS-OTA-Downgrader seems to be incomplete."
|
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."
|
Error "Platform unknown/not supported."
|
||||||
fi
|
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/*
|
chmod +x ./resources/*.sh ./resources/tools/*
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
Error "A problem with file permissions has been detected, cannot proceed."
|
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 "* A newer version of iOS-OTA-Downgrader is available."
|
||||||
Echo "* Current version: $CurrentVersion"
|
Echo "* Current version: $CurrentVersion"
|
||||||
Echo "* Latest version: $LatestVersion"
|
Echo "* Latest version: $LatestVersion"
|
||||||
Echo "* Please download the latest version before continuing."
|
Echo "* Please download/pull the latest version before continuing."
|
||||||
ExitWin 0
|
ExitWin 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user