summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <bernhard.rosenkranzer@linaro.org>2015-06-26 18:57:21 +0000
committerLinaro Android Code Review <android-review@review.linaro.org>2015-06-26 18:57:21 +0000
commita09b0dd207e61fc7cceaebe7ad7c284431cb818f (patch)
tree06a199395309e49ecc7629fee38cd8b50dede3d6
parente5f3e5b59b099f16cf2bf1497b5a866379efef20 (diff)
parent8d1235f9da24da42a9e128846989b2f19219615f (diff)
downloadupdate-externals-a09b0dd207e61fc7cceaebe7ad7c284431cb818f.tar.gz
Merge "Modify pcre updater Re-apply the Android related patches on the top of pcre."
-rwxr-xr-xpcre.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/pcre.sh b/pcre.sh
index 80d1b79..8ceb65b 100755
--- a/pcre.sh
+++ b/pcre.sh
@@ -29,14 +29,29 @@ if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
notice "pcre is up to date in AOSP master, copying its work"
else
notice "Updating pcre to $NEW_VERSION"
+ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$AOSPVER.tar.bz2
+ tar -jxvf pcre-$AOSPVER.tar.bz2
+
+ diff -rubN pcre-$AOSPVER dist > Android.patch
+
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$NEW_VERSION.tar.bz2
tar -jxvf pcre-$NEW_VERSION.tar.bz2
- rm -rf dist
+
+ rm -rf pcre-$NEW_VERSION.tar.bz2 pcre-$AOSPVER.tar.bz2 pcre-$AOSPVER
+ rm -rf dist pcre-$AOSPVER
mv pcre-$NEW_VERSION dist
- rm pcre-$NEW_VERSION.tar.bz2
- git commit -asm "Update to pcre $NEW_VERSION"
- git clean -d -f -x
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated pcre to $NEW_VERSION."
+ git commit -asm "Update to pcre $NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update pcre - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+ fi
fi
git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$NEW_VERSION