From a8a404c05ac23fb8e9464e139a87c5f52db6bdbb Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 28 Aug 2013 01:13:43 +0100 Subject: [PATCH] Slight tweak to the "startup logic" This fixes #102 (which would also get triggered if you rpi-updated to a specific revision, and then later tried rpi-updating to the latest revision) --- rpi-update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpi-update b/rpi-update index 5825a1f..e663340 100755 --- a/rpi-update +++ b/rpi-update @@ -202,7 +202,7 @@ echo " *** ARM/GPU split is now defined in /boot/config.txt using the gpu_mem op if [[ ${FW_REV} != "" ]]; then download_rev do_update "updated to revision ${FW_REV}" -elif [[ -f "${FW_REPOLOCAL}/.git/config" ]]; then +elif [[ -f "${FW_REPOLOCAL}/bootcode.bin" ]]; then # ask git server version before spending time cloning GITREV=$(git ls-remote -h ${REPO_URI} refs/heads/${BRANCH} | awk '{print $1}') if [[ -f "${FW_PATH}/.firmware_revision" ]] && [[ $(cat "${FW_PATH}/.firmware_revision") == "$GITREV" ]]; then @@ -215,6 +215,10 @@ elif [[ -f "${FW_REPOLOCAL}/.git/config" ]]; then fi else echo " *** We're running for the first time" + if [[ -d "${FW_REPOLOCAL}" ]]; then + # rpi-update must have errored during the first run + rm -rf "${FW_REPOLOCAL}" + fi download_repo do_backup do_update "setup"