Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #72 from Churten/master

Ask git server about head revision before downloading
  • Loading branch information...
commit f87b3014deda485730a84ad6f5dc53080e95c90d 2 parents 10ad1e9 + 792b730
@popcornmix popcornmix authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 rpi-update
View
9 rpi-update
@@ -197,11 +197,14 @@ if [[ ${FW_REV} != "" ]]; then
download_rev
do_update "updated to revision ${FW_REV}"
elif [[ -f "${FW_REPOLOCAL}/.git/config" ]]; then
- update_repo
- if [[ -f "${FW_PATH}/.firmware_revision" ]] && [[ $(cat "${FW_PATH}/.firmware_revision") == $(eval ${GITCMD} rev-parse master) ]]; then
+ # ask git server version before spending time cloning
+ GITREV=$(git ls-remote -h ${REPO_URI} refs/heads/master | awk '{print $1}')
+ if [[ -f "${FW_PATH}/.firmware_revision" ]] && [[ $(cat "${FW_PATH}/.firmware_revision") == "$GITREV" ]]; then
echo " *** Your firmware is already up to date"
- finalise
+ # no changes made, nothing to finalise
+ # finalise
else
+ update_repo
do_update "updated"
fi
else
Please sign in to comment.
Something went wrong with that request. Please try again.