mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
Exit
This commit is contained in:
parent
d558eb1997
commit
3536ae9478
10
restore.sh
10
restore.sh
@ -34,8 +34,7 @@ function Log {
|
|||||||
|
|
||||||
function Error {
|
function Error {
|
||||||
echo "[Error] $1" | tee -a restore_log.txt
|
echo "[Error] $1" | tee -a restore_log.txt
|
||||||
if [[ ! -z $2 ]]; then
|
[[ ! -z $2 ]] && echo $2 | tee -a restore_log.txt
|
||||||
echo $2 | tee -a restore_log.txt
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,10 +140,11 @@ function Action {
|
|||||||
if [[ $Mode == 'Downgrade' ]]; then
|
if [[ $Mode == 'Downgrade' ]]; then
|
||||||
Downgrade
|
Downgrade
|
||||||
elif [[ $Mode == 'SaveOTABlobs' ]]; then
|
elif [[ $Mode == 'SaveOTABlobs' ]]; then
|
||||||
SaveOTABlobs; exit
|
SaveOTABlobs
|
||||||
elif [[ $Mode == 'kDFU' ]]; then
|
elif [[ $Mode == 'kDFU' ]]; then
|
||||||
kDFU; exit
|
kDFU
|
||||||
fi
|
fi
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
function SaveOTABlobs {
|
function SaveOTABlobs {
|
||||||
@ -154,7 +154,6 @@ function SaveOTABlobs {
|
|||||||
SHSH=$(ls ${UniqueChipID}_${ProductType}_${DowngradeVer}-*.shsh2)
|
SHSH=$(ls ${UniqueChipID}_${ProductType}_${DowngradeVer}-*.shsh2)
|
||||||
if [ ! -e "$SHSH" ]; then
|
if [ ! -e "$SHSH" ]; then
|
||||||
Error "Saving $DowngradeVer blobs failed. Please run the script again" "It is also possible that $DowngradeVer for $ProductType is no longer signed"
|
Error "Saving $DowngradeVer blobs failed. Please run the script again" "It is also possible that $DowngradeVer for $ProductType is no longer signed"
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
mkdir -p saved/shsh 2>/dev/null
|
mkdir -p saved/shsh 2>/dev/null
|
||||||
cp "$SHSH" saved/shsh
|
cp "$SHSH" saved/shsh
|
||||||
@ -309,7 +308,6 @@ function Downgrade {
|
|||||||
Log "Stopping local server..."
|
Log "Stopping local server..."
|
||||||
ps aux | awk '/python3/ {print "sudo kill -9 "$2" 2>/dev/null"}' | bash
|
ps aux | awk '/python3/ {print "sudo kill -9 "$2" 2>/dev/null"}' | bash
|
||||||
Log "Downgrade script done!"
|
Log "Downgrade script done!"
|
||||||
exit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function InstallDependencies {
|
function InstallDependencies {
|
||||||
|
Loading…
Reference in New Issue
Block a user