. $(dirname $0)/functions checkout platform/external/fio cd $SRC/platform/external/fio V=$(latest $(git tag |grep -E '^fio-[0-9]+\.' |sed -e 's,^fio-,,' |grep -v '[a-z]')) if git branch -a |grep -q linaro-upstream-$V; then ok "fio is up to date." exit 0 fi notice "Updating fio to $V" LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream- |sed -e 's,^.*/linaro-upstream-,,')) if [ "$LATEST_LINARO" != "0" ]; then git checkout -b linaro-upstream-work-$TIMESTAMP origin/linaro-upstream-$LATEST_LINARO else git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master fi if git merge fio-$V -m "Merge update to $V"; then notice "Auto-updated fio to $V." else error "Couldn't auto-update fio - updates failed to merge." 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