diff --git a/downr1n.sh b/downr1n.sh index 8e6d021..24e52eb 100755 --- a/downr1n.sh +++ b/downr1n.sh @@ -805,6 +805,16 @@ if [ "$downgrade" = "1" ] || [ "$jailbreak" = "1" ]; then fi +version_code="" + +if [ "$downgrade" = "1" ]; then + if [ "$os" = 'Darwin' ]; then + version_code=$(/usr/bin/plutil -extract "ProductBuildVersion" xml1 -o - work/BuildManifest.plist | grep '' |cut -d\> -f2 |cut -d\< -f1 | head -1) + else + version_code=$("$dir"/PlistBuddy work/BuildManifest.plist -c "Print ProductBuildVersion" | sed 's/"//g') + fi + +fi if [ "$downgrade" = "1" ] || [ "$jailbreak" = "1" ]; then # extracting ipsw @@ -1286,4 +1296,4 @@ if [ true ]; then fi -} 2>&1 | tee logs/${log} +} 2>&1 | tee logs/${log} \ No newline at end of file