Update SaveExternal

This commit is contained in:
LukeeGD 2020-07-30 19:31:55 +08:00
parent 972093c836
commit 64e143db0e
2 changed files with 25 additions and 23 deletions

0
resources/tools/futurerestore152_macos Normal file → Executable file
View File

View File

@ -37,7 +37,8 @@ function Main {
tsschecker="env LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform" tsschecker="env LD_LIBRARY_PATH=/usr/local/lib resources/tools/tsschecker_$platform"
chmod +x resources/tools/* chmod +x resources/tools/*
SaveExternal firmware mkdir tmp
SaveExternal iOS-OTA-Downgrader-Keys
SaveExternal ipwndfu SaveExternal ipwndfu
DFUDevice=$(lsusb | grep -c '1227') DFUDevice=$(lsusb | grep -c '1227')
@ -149,24 +150,23 @@ function Action {
fi fi
if [ $ProductType == iPod5,1 ]; then if [ $ProductType == iPod5,1 ]; then
iBSS="iBSS.${HWModel}ap.RELEASE" iBSS="${HWModel}ap"
iBSSBuildVer='10B329' iBSSBuildVer='10B329'
elif [ $ProductType == iPad3,1 ]; then elif [ $ProductType == iPad3,1 ]; then
iBSS="iBSS.${HWModel}ap.RELEASE" iBSS="${HWModel}ap"
iBSSBuildVer='11D257' iBSSBuildVer='11D257'
elif [ $ProductType == iPhone6,1 ] || [ $ProductType == iPhone6,2 ]; then elif [ $ProductType == iPhone6,1 ] || [ $ProductType == iPhone6,2 ]; then
iBSS="iBSS.iphone6.RELEASE" iBSS="iphone6"
iBEC="iBEC.iphone6.RELEASE"
elif [ $ProductType == iPad4,1 ] || [ $ProductType == iPad4,2 ] || [ $ProductType == iPad4,3 ]; then elif [ $ProductType == iPad4,1 ] || [ $ProductType == iPad4,2 ] || [ $ProductType == iPad4,3 ]; then
iBSS="iBSS.ipad4.RELEASE" iBSS="ipad4"
iBEC="iBEC.ipad4.RELEASE"
elif [ $ProductType == iPad4,4 ] || [ $ProductType == iPad4,5 ]; then elif [ $ProductType == iPad4,4 ] || [ $ProductType == iPad4,5 ]; then
iBSS="iBSS.ipad4b.RELEASE" iBSS="ipad4b"
iBEC="iBEC.ipad4b.RELEASE"
else else
iBSS="iBSS.$HWModel.RELEASE" iBSS="$HWModel"
iBSSBuildVer='12H321' iBSSBuildVer='12H321'
fi fi
iBEC="iBEC.$iBSS.RELEASE"
iBSS="iBSS.$iBSS.RELEASE"
IV=$(cat $Firmware/$iBSSBuildVer/iv 2>/dev/null) IV=$(cat $Firmware/$iBSSBuildVer/iv 2>/dev/null)
Key=$(cat $Firmware/$iBSSBuildVer/key 2>/dev/null) Key=$(cat $Firmware/$iBSSBuildVer/key 2>/dev/null)
@ -517,20 +517,22 @@ function Compile {
} }
function SaveExternal { function SaveExternal {
if [[ ! $(ls resources/$1 2>/dev/null) ]]; then ExternalURL="https://github.com/LukeZGD/$1.git"
if [[ $1 == 'ipwndfu' ]]; then External=$1
ExternalURL="https://github.com/LukeZGD/ipwndfu/archive/master.zip" [[ $1 == "iOS-OTA-Downgrader-Keys" ]] && External="firmware"
ExternalFile="ipwndfu-master" if [[ ! -d resources/$External ]] || [[ ! -d resources/$External/.git ]]; then
else Log "Downloading $External..."
ExternalURL="https://github.com/LukeZGD/iOS-OTA-Downgrader/archive/$1.zip" cd tmp
ExternalFile="iOS-OTA-Downgrader-$1" git clone $ExternalURL $External &>/dev/null
fi rm -rf ../resources/$External
Log "Downloading $1..." cp -r $External/ ../resources/
curl -Ls $ExternalURL -o tmp/$ExternalFile.zip else
unzip -q tmp/$ExternalFile.zip -d tmp Log "Updating $External..."
mkdir resources/$1 cd resources/$External
mv tmp/$ExternalFile/* resources/$1 git pull &>/dev/null
cd ..
fi fi
cd ..
} }
function SavePkg { function SavePkg {