diff --git a/restore.sh b/restore.sh index 5cc47dd..66afa5e 100755 --- a/restore.sh +++ b/restore.sh @@ -491,16 +491,18 @@ function SaveExternal { [[ $1 == "iOS-OTA-Downgrader-Keys" ]] && External="firmware" if [[ ! -d resources/$External ]] || [[ ! -d resources/$External/.git ]]; then Log "Downloading $External..." - cd tmp - git clone $ExternalURL $External &>/dev/null - rm -rf ../resources/$External - cp -r $External/ ../resources/ + cd resources + rm -rf $External + git clone $ExternalURL $External else Log "Updating $External..." cd resources/$External - git pull &>/dev/null + git pull 2>/dev/null cd .. fi + if [[ ! -e $External/README.md ]] || [[ ! -d $External/.git ]]; then + Error "Downloading/updating $1 failed. Please run the script again" + fi cd .. }