summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/checkout.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/libstagefright/checkout.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libstagefright/checkout.sh')
-rwxr-xr-xmedia/libstagefright/checkout.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/media/libstagefright/checkout.sh b/media/libstagefright/checkout.sh
new file mode 100755
index 000000000..42dfb87fd
--- /dev/null
+++ b/media/libstagefright/checkout.sh
@@ -0,0 +1,52 @@
+#!/bin/bash -e
+set -o pipefail
+abort () {
+ errcode=$?
+ echo "Error: That didn't work..."
+ exit $errcode
+}
+trap abort ERR
+
+cd `dirname "$0"`
+
+SITE=https://android.googlesource.com/platform
+for TAGFILE in `find patches -name \*.tag`
+do
+ REPO=${TAGFILE:8:-4}
+ DEST=android/${REPO}
+ if [[ ! -e ${DEST} ]]
+ then
+ mkdir -p `dirname ${DEST}`
+ echo Cloning from ${SITE}/${REPO}
+ git clone ${SITE}/${REPO} ${DEST}
+ fi
+
+ rm -fR ${REPO}
+ TAG=`cat $TAGFILE`
+ (cd $DEST && git reset --hard 2>&1 && git checkout ${TAG} 2>&1) > /dev/null
+done
+
+FILES=`python files.py`
+HEADERS=`cat additional_headers`
+for FILE in $FILES $HEADERS frameworks/av/media/libstagefright/include/AMRExtractor.h
+do
+ echo Copying ${FILE}
+ mkdir -p `dirname ${FILE}`
+ cp android/${FILE} ${FILE}
+done
+
+for PATCH in `find patches -name \*.patch`
+do
+ REPO=${PATCH:8:-6}
+ echo Patching repo ${REPO}
+ for FILE in `grep -- '--- a/' ${PATCH} | colrm 1 6`
+ do
+ if [[ ! -e ${FILE} ]]
+ then
+ echo Copying ${REPO}/${FILE}
+ mkdir -p `dirname ${REPO}/${FILE}`
+ cp android/${REPO}/${FILE} ${REPO}/${FILE}
+ fi
+ done
+ (cd ${REPO} && patch -p1 || true) < $PATCH
+done