From c5d159c8b128ef1dd5ab0ad2f5593ab8c253391c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 30 Jan 2013 20:09:09 +0000 Subject: [PATCH] Updating a depth=1 git tree doesn't work, so just kill it and clone a new one --- rpi-update | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/rpi-update b/rpi-update index d16b54f..0eddcde 100755 --- a/rpi-update +++ b/rpi-update @@ -126,27 +126,9 @@ function download_repo { } function update_repo { - echo " *** Updating firmware (this may take a few minutes)" - set +e - eval ${GITCMD} fetch --depth=1 - RETVAL=$? - set -e - if [[ ${RETVAL} -ne 0 ]]; then - echo " !!! Failed to fetch updated firmware files, trying a fresh checkout" - rm -rf ${FW_REPOLOCAL} - download_repo - return - fi - set +e - eval ${GITCMD} reset --hard && eval ${GITCMD} clean -f -d && eval ${GITCMD} merge origin/master -m "automerge" - RETVAL=$? - set -e - if [[ ${RETVAL} -ne 0 ]]; then - echo " !!! Failed to merge updated firmware files, trying a fresh checkout" - rm -rf ${FW_REPOLOCAL} - download_repo - return - fi + # updating a depth=1 git tree doesn't work, so just kill it and clone a new one + rm -rf ${FW_REPOLOCAL} + download_repo } function do_backup {