. $(dirname $0)/functions # Unfortunately, Android's libpng doesn't share history with the # official libpng git repository. # git rebase and friends aren't as useful as they should be. # Let's fix this, however... linaro-upstream-* branches are based # on the upstream git repositories. checkout platform/external/libpng cd $SRC/platform/external/libpng V=$(latest $(git tag |grep ^v |grep -vE '(alpha|beta|pre|rc)' |grep -v '[a-z]$' |sed -e 's,^v,,')) if git branch -a |grep -q linaro-upstream-$V; then ok "libpng is up to date." exit 0 fi notice "Updating libpng to $V" LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream- |sed -e 's,^.*/linaro-upstream-,,')) git checkout -b linaro-upstream-work-$TIMESTAMP origin/linaro-upstream-$LATEST_LINARO if git rebase v$V; then notice "Auto-updated libpng to $V." else error "Couldn't auto-update libpng - patch failed to rebase." error "Please fix manually and commit to a branch called" error "linaro-upstream-$V." exit 1 fi git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$V git pull git checkout -b linaro-upstream-$V origin/linaro-upstream-$V git branch -D linaro-upstream-work-$TIMESTAMP