summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvaylo Asenov <ivaylo.asenov@linaro.org>2017-06-22 10:40:09 +0100
committerIvaylo Asenov <ivaylo.asenov@linaro.org>2017-06-22 10:42:05 +0100
commit480ab09170215ea3a3dc027a96c431d16974e2aa (patch)
treec267ae64414b659700b6abd0c60b43176293233d
parentb9e5b74a643e56d3ad78cde7be8283e81fbb0ccf (diff)
downloadupdate-externals-480ab09170215ea3a3dc027a96c431d16974e2aa.tar.gz
Add more updaters
New updaters: e2fsprogs.sh elfutils.sh freetype.sh imagemagick.sh iproute2.sh ipsec-tools.sh iputils.sh jemalloc.sh kmod.sh libcap_ng.sh libedit.sh libevent.sh libjpeg_turbo.sh libmpt.sh libogg.sh libopus.sh libxml2.sh tremolo.sh Modify "libusb.sh" Change-Id: Id0da90ea5fc9f663efa23064f5cbb1e8032bce11 Signed-off-by: Ivaylo Asenov <ivaylo.asenov@linaro.org>
-rwxr-xr-xe2fsprogs.sh96
-rwxr-xr-xelfutils.sh108
-rwxr-xr-xfreetype.sh157
-rw-r--r--functions1
-rwxr-xr-ximagemagick.sh112
-rwxr-xr-xiproute2.sh93
-rwxr-xr-xipsec-tools.sh91
-rwxr-xr-xiputils.sh73
-rwxr-xr-xjemalloc.sh86
-rwxr-xr-xkmod.sh36
-rwxr-xr-xlibcap_ng.sh70
-rwxr-xr-xlibedit.sh66
-rwxr-xr-xlibevent.sh69
-rwxr-xr-xlibjpeg_turbo.sh91
-rwxr-xr-xlibmpt.sh66
-rwxr-xr-xlibogg.sh65
-rwxr-xr-xlibopus.sh97
-rwxr-xr-xlibusb.sh31
-rwxr-xr-xlibxml2.sh66
-rwxr-xr-xpcre.sh21
-rwxr-xr-xtremolo.sh65
21 files changed, 1543 insertions, 17 deletions
diff --git a/e2fsprogs.sh b/e2fsprogs.sh
new file mode 100755
index 0000000..0a81ad2
--- /dev/null
+++ b/e2fsprogs.sh
@@ -0,0 +1,96 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+NEW_VERSION=$(latest $(wget -O - --no-verbose -q https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/ | grep -E 'v[0-9]' | sed -e 's,^<a href="v,,' | cut -d '/' -f1))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+
+checkout platform/external/e2fsprogs
+
+cd $SRC/platform/external/e2fsprogs
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "e2fsprogs is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "e2fsprogs is up to date in AOSP master, copying its work"
+else
+ notice "Updating e2fsprogs to $NEW_VERSION"
+
+ rm -f Android.patch
+
+ cd $SRC/platform/external
+ wget https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$AOSPVER/e2fsprogs-$AOSPVER.tar.gz
+ tar -zxf e2fsprogs-$AOSPVER.tar.gz
+
+ cd $SRC/platform/external/e2fsprogs
+ #diff -ruN -x '.git' -x 'Android.patch' -x 'Android.mk' ../e2fsprogs-$AOSPVER ./ > Android.patch
+
+ cd $SRC/platform/external
+ wget https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$NEW_VERSION/e2fsprogs-$NEW_VERSION.tar.gz
+ tar -zxf e2fsprogs-$NEW_VERSION.tar.gz
+
+ rm -rf e2fsprogs-$AOSPVER e2fsprogs-$NEW_VERSION.tar.gz e2fsprogs-$AOSPVER.tar.gz
+# cp -rf e2fsprogs/Android.patch e2fsprogs-$NEW_VERSION
+# cp -rf e2fsprogs/.git e2fsprogs-$NEW_VERSION
+# cp -rf e2fsprogs/MODULE_LICENSE_GPL e2fsprogs-$NEW_VERSION
+# cp -rf e2fsprogs/contrib/android e2fsprogs-$NEW_VERSION/contrib
+# rm -rf e2fsprogs
+
+ cd $SRC/platform/external/e2fsprogs
+ #mv e2fsprogs-$NEW_VERSION e2fsprogs
+ for i in *; do
+ if [ -e ../e2fsprogs-$NEW_VERSION/$i ]; then
+ cp -rf ../e2fsprogs-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external/e2fsprogs
+
+
+
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated e2fsprogs to $NEW_VERSION."
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ git commit -asm "Update to e2fsprogs $NEW_VERSION"
+ git clean -d -f -x
+ else
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ error "Couldn't auto-update e2fsprogs - 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
+#git pull
+#git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+#git branch -D linaro-upstream-work-$TIMESTAMP
+
+pwd
+ \ No newline at end of file
diff --git a/elfutils.sh b/elfutils.sh
new file mode 100755
index 0000000..e33d936
--- /dev/null
+++ b/elfutils.sh
@@ -0,0 +1,108 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+numbertover () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="v$V1.$V2.$V3"
+ echo -n $V
+}
+
+cd $SRC/platform/external
+if [ -d elfutils-upstream ]; then
+ cd elfutils-upstream
+ git checkout master
+ git pull
+else
+ git clone git://sourceware.org/git/elfutils.git elfutils-upstream
+ cd elfutils-upstream
+fi
+
+
+NEW_VERSION=$(latest $(git tag | grep -E 'elfutils-' | sed -e 's,^elfutils-0.,,'))
+echo "NEW_VERSION = 0.$NEW_VERSION"
+
+
+checkout platform/external/elfutils
+
+cd $SRC/platform/external/elfutils
+if git branch -a |grep -q linaro-upstream-0.$NEW_VERSION; then
+ ok "elfutils is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+
+AOSPVER=$(latest $(grep "Version" NEWS | sed -e 's,^Version 0.,,'| sed -e "s/:/ /g"))
+echo "AOSPVER = 0.$AOSPVER"
+
+
+if [ "$NEW_VERSION" = "$AOSPVER" ]; then
+ notice "elfutils is up to date in AOSP master, copying its work"
+else
+ LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream |sed -e 's,.*-0.,,'))
+ if [ -n "$LATEST_LINARO" ]; then
+ if [ "$(latest $LATEST_LINARO $AOSPVER)" != "$AOSPVER" ]; then
+ git checkout linaro-upstream-$LATEST_LINARO || git checkout -b linaro-upstream-$LATEST_LINARO origin/linaro-upstream-$LATEST_LINARO
+ fi
+ fi
+
+ notice "Updating elfutils to $NEW_VERSION"
+
+ rm -f Android.patch
+ cd ../elfutils-upstream
+ git checkout -b linaro-upstream-work-$TIMESTAMP elfutils-0.$AOSPVER
+ cd ../elfutils
+ for i in *; do
+ if [ -e ../elfutils-upstream/$i ]; then
+ diff -ruN ../elfutils-upstream/$i $i >>Android.patch
+ fi
+ done
+ cd ../elfutils-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ git checkout -b linaro-upstream-work-$TIMESTAMP elfutils-0.$NEW_VERSION
+ cd ../elfutils
+ for i in *; do
+ if [ -e ../elfutils-upstream/$i ]; then
+ cp -rf ../elfutils-upstream/$i .
+ fi
+ done
+
+
+ if patch -p0 <Android.patch; then
+ rm Android.patch
+ notice "Auto-updated elfutils to 0.$NEW_VERSION."
+ git commit -asm "Update to elfutils 0.$NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update elfutils - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+ fi
+ cd ../elfutils-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ cd ../elfutils
+
+
+fi
+
+git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$NEW_VERSION
+git pull
+git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+git branch -D linaro-upstream-work-$TIMESTAMP
+
+pwd \ No newline at end of file
diff --git a/freetype.sh b/freetype.sh
new file mode 100755
index 0000000..7aa0c91
--- /dev/null
+++ b/freetype.sh
@@ -0,0 +1,157 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+numbertover () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="v$V1.$V2.$V3"
+ echo -n $V
+}
+
+
+replaceover () {
+ local VERSIONID=$1
+ local V=$(echo "$VERSIONID" | sed 's/\./-/g')
+ echo -n VER-$V
+}
+
+
+cd $SRC/platform/external
+if [ -d freetype-upstream ]; then
+ cd freetype-upstream
+ git checkout master
+ git pull
+else
+ git clone git://git.savannah.gnu.org/freetype/freetype2.git freetype-upstream
+ cd freetype-upstream
+fi
+
+NEW_VERSION=$(latest $(git tag | grep -E 'VER-[0-9]+\-'|sed -e 's,^VER-,,' |grep -v '[A-Z]' |grep -v '[a-z]'|sed -e "s/-/./g"))
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/freetype
+
+cd $SRC/platform/external/freetype
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "freetype is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER_A=$(grep "Version:" README.version)
+#echo "AOSPVER_A = $AOSPVER_A"
+
+AOSPVER_B=$(echo "$AOSPVER_A" | grep -oP '(?<=.)\d+(?=\.)'| awk '{print $1}' ORS='.')
+#echo "AOSPVER_B = $AOSPVER_B"
+
+AOSPVER_C=$(echo "$AOSPVER_A" | grep -oP '(\d+)(?!.*\d)')
+#echo "AOSPVER_C = $AOSPVER_C"
+
+AOSPVER=$AOSPVER_B$AOSPVER_C
+echo "AOSPVER = $AOSPVER"
+
+
+CHECK_VERSION=$(latest $NEW_VERSION $AOSPVER)
+echo "CHECK_VERSION = $CHECK_VERSION"
+
+if [ "$CHECK_VERSION" = "$AOSPVER" ]; then
+ notice "freetype is up to date in AOSP master, copying its work"
+else
+
+ LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream |sed -e 's,.*-,,'))
+ if [ -n "$LATEST_LINARO" ]; then
+ if [ "$(latest $LATEST_LINARO $AOSPVER)" != "$AOSPVER" ]; then
+ git checkout linaro-upstream-$LATEST_LINARO || git checkout -b linaro-upstream-$LATEST_LINARO origin/linaro-upstream-$LATEST_LINARO
+ fi
+ fi
+
+
+ notice "Updating freetype to $NEW_VERSION"
+
+
+ rm -f Android.patch
+ cd $SRC/platform/external/freetype-upstream
+ git checkout -b linaro-upstream-work-$TIMESTAMP $(replaceover $AOSPVER)
+ cd $SRC/platform/external/freetype/src
+ for i in *; do
+ if [ -e ../../freetype-upstream/src/$i ]; then
+ diff -ruN -x 'module.mk' -x 'rules.mk' -x 'Jamfile' ../../freetype-upstream/src/$i $i >>$SRC/platform/external/freetype/src/Android.patch
+ fi
+ done
+
+ cd $SRC/platform/external/freetype/include
+ for i in *; do
+ if [ -e ../../freetype-upstream/include/$i ]; then
+ diff -ruN -x 'module.mk' -x 'rules.mk' -x 'Jamfile' ../../freetype-upstream/include/$i $i >>$SRC/platform/external/freetype/include/Android.patch
+ fi
+ done
+
+
+ cd $SRC/platform/external/freetype-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ git checkout -b linaro-upstream-work-$TIMESTAMP $(replaceover $NEW_VERSION)
+ cd $SRC/platform/external/freetype/src
+ for i in *; do
+ if [ -e ../../freetype-upstream/src/$i ]; then
+ cp -rf ../../freetype-upstream/src/$i .
+ fi
+ done
+
+ cd $SRC/platform/external/freetype/include
+ for i in *; do
+ if [ -e ../../freetype-upstream/include/$i ]; then
+ cp -rf ../../freetype-upstream/include/$i .
+ fi
+ done
+
+ cd $SRC/platform/external/freetype/src
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ cd $SRC/platform/external/freetype/include
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated freetype to $NEW_VERSION."
+ cd $SRC/platform/external/freetype
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ git commit -asm "Update to freetype $NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update freetype - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+ fi
+
+ else
+ error "Couldn't auto-update freetype - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+ fi
+ cd $SRC/platform/external/freetype-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ cd $SRC/platform/external/freetype
+
+fi
+
+
+git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$AOSPVER
+git pull
+git checkout -b linaro-upstream-$AOSPVER origin/linaro-upstream-$AOSPVER
+git branch -D linaro-upstream-work-$TIMESTAMP
+pwd
diff --git a/functions b/functions
index 14d6ecf..cc1c781 100644
--- a/functions
+++ b/functions
@@ -54,6 +54,7 @@ checkout() {
[ "$B" = "libpng" ] && git remote add upstream git://git.code.sf.net/p/libpng/code
[ "$B" = "harfbuzz_ng" ] && git remote add upstream git://anongit.freedesktop.org/harfbuzz.git
[ "$B" = "fio" ] && git remote add upstream git://git.kernel.dk/fio.git
+ [ "$B" = "kmod" ] && git remote add upstream git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
git fetch --all
git pull
popd
diff --git a/imagemagick.sh b/imagemagick.sh
new file mode 100755
index 0000000..a1b33f1
--- /dev/null
+++ b/imagemagick.sh
@@ -0,0 +1,112 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+numbertover () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V4=$(echo $VERSIONID | cut -d. -f4)
+ local V="$V1.$V2.$V3-$V4"
+ echo -n $V
+}
+
+
+
+
+cd $SRC/platform/external
+if [ -d ImageMagick-upstream ]; then
+ cd ImageMagick-upstream
+ git checkout master
+ git pull
+else
+ git clone http://git.imagemagick.org/repos/ImageMagick ImageMagick-upstream
+ cd ImageMagick-upstream
+fi
+
+NEW_VERSION=$(latest $(git tag | grep -E '[0-9]' | sed -e "s/-/./g"))
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+
+checkout platform/external/ImageMagick
+
+cd $SRC/platform/external/ImageMagick
+if git branch -a |grep -q linaro-upstream-$NEW_VERSION; then
+ ok "ImageMagick is up to date."
+ exit 0
+fi
+
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+
+AOSPVER=$(latest $(grep "Release ImageMagick version" ChangeLog | cut -d' ' -f7 | sed -e "s/,//g" | sed -e "s/-/./g"))
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$NEW_VERSION" = "$AOSPVER" ]; then
+ notice "ImageMagick is up to date in AOSP master, copying its work"
+else
+ LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream |sed -e 's,.*-,,'))
+ if [ -n "$LATEST_LINARO" ]; then
+ if [ "$(latest $LATEST_LINARO $AOSPVER)" != "$AOSPVER" ]; then
+ git checkout linaro-upstream-$LATEST_LINARO || git checkout -b linaro-upstream-$LATEST_LINARO origin/linaro-upstream-$LATEST_LINARO
+ fi
+ fi
+
+ notice "Updating ImageMagick to $NEW_VERSION"
+
+ rm -f Android.patch
+ cd ../ImageMagick-upstream
+ git checkout -b linaro-upstream-work-$TIMESTAMP "$(numbertover $AOSPVER)"
+ cd ../ImageMagick
+ for i in *; do
+ if [ -e ../ImageMagick-upstream/$i ]; then
+ diff -ruN ../ImageMagick-upstream/$i $i >>Android.patch
+ fi
+ done
+ cd ../ImageMagick-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ git checkout -b linaro-upstream-work-$TIMESTAMP "$(numbertover $NEW_VERSION)"
+ cd ../ImageMagick
+ for i in *; do
+ if [ -e ../ImageMagick-upstream/$i ]; then
+ cp -rf ../ImageMagick-upstream/$i .
+ fi
+ done
+
+
+ if patch -p0 <Android.patch; then
+ rm Android.patch
+ notice "Auto-updated ImageMagick to $(numbertover $NEW_VERSION)."
+ git commit -asm "Update to ImageMagick $(numbertover $NEW_VERSION)"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update ImageMagick - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+ fi
+ cd ../ImageMagick-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ cd ../ImageMagick
+
+fi
+
+git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$NEW_VERSION
+git pull
+git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+git branch -D linaro-upstream-work-$TIMESTAMP
+
+pwd
diff --git a/iproute2.sh b/iproute2.sh
new file mode 100755
index 0000000..d488c7d
--- /dev/null
+++ b/iproute2.sh
@@ -0,0 +1,93 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(latest $(wget -O - --no-verbose -q https://www.kernel.org/pub/linux/utils/net/iproute2/ | grep -E 'iproute2-[0-9]' | sed -e 's,^<a href="iproute2-,,' | cut -d '"' -f1 | sed -e "s/.tar.*/ /g"))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+
+checkout platform/external/iproute2
+
+cd $SRC/platform/external/iproute2
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "iproute2 is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "iproute2 is up to date in AOSP master, copying its work"
+else
+ notice "Updating iproute2 to $NEW_VERSION"
+
+ rm -f Android.patch
+
+ cd $SRC/platform/external
+ wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-$AOSPVER.tar.gz
+ tar -zxf iproute2-$AOSPVER.tar.gz
+
+ cd $SRC/platform/external/iproute2
+
+# for i in *; do
+# if [ -e ../iproute2-$AOSPVER/$i ]; then
+# diff -ruN ../iproute2-$AOSPVER/$i $i >>Android.patch
+# fi
+# done
+
+ cd $SRC/platform/external
+ wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-$NEW_VERSION.tar.gz
+ tar -zxf iproute2-$NEW_VERSION.tar.gz
+
+ cd $SRC/platform/external/iproute2
+ for i in *; do
+ if [ -e ../iproute2-$NEW_VERSION/$i ]; then
+ cp -rf ../iproute2-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf iproute2-$AOSPVER iproute2-$NEW_VERSION.tar.gz iproute2-$AOSPVER.tar.gz iproute2-$NEW_VERSION
+
+
+ cd $SRC/platform/external/iproute2
+
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated iproute2 to $NEW_VERSION."
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ git commit -asm "Update to iproute2 $NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update iproute2 - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ exit 1
+ fi
+
+
+fi
+
+git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$NEW_VERSION
+git pull
+git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+git branch -D linaro-upstream-work-$TIMESTAMP \ No newline at end of file
diff --git a/ipsec-tools.sh b/ipsec-tools.sh
new file mode 100755
index 0000000..5d2c5e7
--- /dev/null
+++ b/ipsec-tools.sh
@@ -0,0 +1,91 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+NEW_VERSION_MAIN=$(latest $(curl ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/ | cut -d' ' -f13,14 | cut -d' ' -f2))
+NEW_VERSION=$(latest $(curl ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/$NEW_VERSION_MAIN/ | grep 'ipsec-tools' | cut -d '-' -f9 | cut -d '.' -f1,2,3))
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/ipsec-tools
+
+cd $SRC/platform/external/ipsec-tools
+
+if git branch -a |grep -q linaro-upstream-$NEW_VERSION; then
+ ok "ipsec-tools is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep Version: README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+AOSPVER_MAIN=$(echo "$AOSPVER" | cut -d'.' -f1,2)
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "ipsec-tools is up to date in AOSP master, copying its work"
+else
+ notice "Updating ipsec-tools to $NEW_VERSION"
+
+ rm -f Android.patch
+ cd $SRC/platform/external
+
+ wget ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/$AOSPVER_MAIN/ipsec-tools-$AOSPVER.tar.gz
+ tar -zxf ipsec-tools-$AOSPVER.tar.gz
+
+
+ rm -rf ipsec-tools-$AOSPVER/src/setkey
+
+# diff -rubN ipsec-tools-$AOSPVER/src ipsec-tools/src > ipsec-tools/Android.patch
+
+ rm -rf ipsec-tools-$AOSPVER.tar.gz ipsec-tools-$AOSPVER
+
+ wget ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/$NEW_VERSION_MAIN/ipsec-tools-$NEW_VERSION.tar.gz
+ tar -zxf ipsec-tools-$NEW_VERSION.tar.gz
+
+ rm -rf ipsec-tools-$NEW_VERSION/src/setkey
+
+ cd ipsec-tools
+ for i in *; do
+ if [ -e ../ipsec-tools-$NEW_VERSION/$i ]; then
+ cp -f ../ipsec-tools-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf ipsec-tools/src
+ mv ipsec-tools-$NEW_VERSION/src ipsec-tools/src
+
+ rm -rf ipsec-tools-$NEW_VERSION.tar.gz
+ rm -rf ipsec-tools-$NEW_VERSION
+
+ cd $SRC/platform/external/ipsec-tools
+
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated ipsec-tools to $NEW_VERSION."
+ git commit -asm "Update to ipsec-tools $NEW_VERSION"
+ git clean -d -f -x
+ else
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ 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
+#git pull
+#git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+#git branch -D linaro-upstream-work-$TIMESTAMP
+pwd \ No newline at end of file
diff --git a/iputils.sh b/iputils.sh
new file mode 100755
index 0000000..12d2ca9
--- /dev/null
+++ b/iputils.sh
@@ -0,0 +1,73 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+latest_local() {
+ local LATEST=0
+ local VERSION
+
+ for VERSION in "$@"; do
+ [ $VERSION -lt $LATEST ] && continue
+ LATEST=$VERSION
+ done
+ echo -n $LATEST
+}
+
+NEW_VERSION=$(latest_local $(wget -O - --no-verbose -q http://www.skbuff.net/iputils/ | grep -E 'iputils-s[0-9]' | sed -e 's,^<tr><td valign="top"><img src="/icons/unknown.gif",,' | cut -d '-' -f2 | cut -d '.' -f1 | sed -e 's,^s,,'))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/iputils
+
+cd $SRC/platform/external/iputils
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "iputils is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2 | sed -e 's,^s,,' )
+echo "AOSPVER = $AOSPVER"
+
+if [ $NEW_VERSION -le $AOSPVER ]; then
+ notice "iputils is up to date in AOSP master, copying its work"
+else
+ notice "Updating iputils to s$NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://www.skbuff.net/iputils/iputils-s$NEW_VERSION.tar.bz2
+ tar -jxf iputils-s$NEW_VERSION.tar.bz2
+
+ cd iputils
+ for i in *; do
+ if [ -e ../iputils-s$NEW_VERSION/$i ]; then
+ cp -rf ../iputils-s$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf iputils-s$NEW_VERSION.tar.bz2 iputils-s$NEW_VERSION
+
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update iputils - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi
+
diff --git a/jemalloc.sh b/jemalloc.sh
new file mode 100755
index 0000000..2a9ae33
--- /dev/null
+++ b/jemalloc.sh
@@ -0,0 +1,86 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+numbertover () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="v$V1.$V2.$V3"
+ echo -n $V
+}
+
+
+replaceover () {
+ local VERSIONID=$1
+ local V=$(echo "$VERSIONID" | sed 's/\./-/g')
+ echo -n VER-$V
+}
+
+
+cd $SRC/platform/external
+if [ -d jemalloc-upstream ]; then
+ cd jemalloc-upstream
+ git checkout master
+ git pull
+else
+ git clone https://github.com/jemalloc/jemalloc jemalloc-upstream
+ cd jemalloc-upstream
+fi
+
+NEW_VERSION=$(latest $(git tag))
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+
+checkout platform/external/jemalloc
+
+cd $SRC/platform/external/jemalloc
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "jemalloc is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+
+AOSPVER=$(grep '*' ChangeLog | awk 'NR==1{print $2}')
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "jemalloc is up to date in AOSP master, copying its work"
+else
+ notice "Updating jemalloc to $NEW_VERSION"
+
+ cd $SRC/platform/external/jemalloc-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ git checkout -b linaro-upstream-work-$TIMESTAMP $NEW_VERSION
+ cd $SRC/platform/external/jemalloc
+ for i in *; do
+ if [ -e ../jemalloc-upstream/$i ]; then
+ cp -rf ../jemalloc-upstream/$i .
+ fi
+ done
+
+ cd $SRC/platform/external/jemalloc-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ cd $SRC/platform/external/jemalloc
+
+ error "Couldn't auto-update jemalloc - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+
+fi
diff --git a/kmod.sh b/kmod.sh
new file mode 100755
index 0000000..bcf45c8
--- /dev/null
+++ b/kmod.sh
@@ -0,0 +1,36 @@
+. $(dirname $0)/functions
+
+checkout platform/external/kmod
+
+cd $SRC/platform/external/kmod
+
+V=$(latest $(git tag | grep ^v | cut -d'v' -f2))
+
+if git branch -a |grep -q linaro-upstream-$V; then
+ ok "kmod is up to date."
+ exit 0
+fi
+
+notice "Updating kmod 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 v$V -m "Merge update to $V"; then
+ notice "Auto-updated kmod 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 \ No newline at end of file
diff --git a/libcap_ng.sh b/libcap_ng.sh
new file mode 100755
index 0000000..15247ef
--- /dev/null
+++ b/libcap_ng.sh
@@ -0,0 +1,70 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(latest $(wget -O - --no-verbose -q http://people.redhat.com/sgrubb/libcap-ng/ | grep "libcap-ng-" | sed -e 's,^<a href="libcap-ng-,,' | cut -d '"' -f1 | sed -e "s/.tar.*/ /g"))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/libcap-ng
+
+cd $SRC/platform/external/libcap-ng
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libcap-ng is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "libcap-ng is up to date in AOSP master, copying its work"
+else
+ notice "Updating libcap-ng to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-$NEW_VERSION.tar.gz
+ tar -zxf libcap-ng-$NEW_VERSION.tar.gz
+
+ cd libcap-ng/libcap-ng-$AOSPVER
+
+ for i in *; do
+ if [ -e ../../libcap-ng-$NEW_VERSION/$i ]; then
+ cp -rf ../../libcap-ng-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external/libcap-ng
+ mv libcap-ng-$AOSPVER libcap-ng-$NEW_VERSION
+
+ cd $SRC/platform/external
+ rm -rf libcap-ng-$NEW_VERSION.tar.gz libcap-ng-$NEW_VERSION
+
+ cd $SRC/platform/external/libcap-ng
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' Android.mk
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' config.h
+
+ error "Couldn't auto-update libcap-ng - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file
diff --git a/libedit.sh b/libedit.sh
new file mode 100755
index 0000000..b624456
--- /dev/null
+++ b/libedit.sh
@@ -0,0 +1,66 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(wget -O - --no-verbose -q http://thrysoee.dk/editline/ | grep ">libedit-" | sed -e 's,^<li><a href="libedit-,,' | sed -e "s/.tar.*//g")
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+checkout platform/external/libedit
+
+cd $SRC/platform/external/libedit
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libedit is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+if [ "$NEW_VERSION" = "$AOSPVER" ]; then
+ notice "libedit is up to date in AOSP master, copying its work"
+else
+ notice "Updating libedit to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://thrysoee.dk/editline/libedit-$NEW_VERSION.tar.gz
+ tar -zxf libedit-$NEW_VERSION.tar.gz
+
+ cd libedit
+
+ for i in *; do
+ if [ -e ../libedit-$NEW_VERSION/$i ]; then
+ cp -rf ../libedit-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf libedit-$NEW_VERSION.tar.gz libedit-$NEW_VERSION
+
+ cd $SRC/platform/external/libedit
+
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update iputils - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+
+fi
+
diff --git a/libevent.sh b/libevent.sh
new file mode 100755
index 0000000..d24ee3d
--- /dev/null
+++ b/libevent.sh
@@ -0,0 +1,69 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(wget -O - --no-verbose -q http://libevent.org/ | grep "libevent-[0-9].*-stable.tar.gz" | awk 'NR==1{print $3}' | sed -e 's,^href="https://github.com/libevent/libevent/releases/download/release-,,' | sed -e "s/-.*//g")
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/libevent
+
+cd $SRC/platform/external/libevent
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libevent is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(latest $(grep "Changes in version" ChangeLog | cut -d' ' -f4 | sed -e "s/-.*//g"))
+echo "AOSPVER = $AOSPVER"
+
+MAX_VER=$(latest $AOSPVER $NEW_VERSION)
+
+if [ "$AOSPVER" = "$MAX_VER" ]; then
+ notice "libevent is up to date in AOSP master, copying its work"
+else
+ notice "Updating libevent to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget https://github.com/libevent/libevent/releases/download/release-$NEW_VERSION-stable/libevent-$NEW_VERSION-stable.tar.gz
+ tar -zxf libevent-$NEW_VERSION-stable.tar.gz
+
+ cd libevent
+
+ for i in *; do
+ if [ -e ../libevent-$NEW_VERSION-stable/$i ]; then
+ cp -rf ../libevent-$NEW_VERSION-stable/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf libevent-$NEW_VERSION-stable.tar.gz libevent-$NEW_VERSION-stable
+
+ cd $SRC/platform/external/libevent
+
+ rm -rf WIN32-Code compat m4 sample test
+
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.android
+
+ error "Couldn't auto-update libevent - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file
diff --git a/libjpeg_turbo.sh b/libjpeg_turbo.sh
new file mode 100755
index 0000000..82ff22b
--- /dev/null
+++ b/libjpeg_turbo.sh
@@ -0,0 +1,91 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+NEW_VERSION=$(wget -O - --no-verbose -q https://sourceforge.net/projects/libjpeg-turbo/files/ | grep 'Click to enter' | awk 'NR==1{print $4$5$6}' | cut -d '"' -f1)
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+BETA_CHECK=$(echo "$NEW_VERSION" | grep "beta")
+
+if [ $BETA_CHECK ]; then
+ echo "Latest libjpeg-turbo version is beta, try to get previous one."
+ NEW_VERSION=$(wget -O - --no-verbose -q https://sourceforge.net/projects/libjpeg-turbo/files/ | grep 'Click to enter' | awk 'NR==2{print $4$5$6}' | cut -d '"' -f1)
+
+ echo "NEW_VERSION = $NEW_VERSION"
+fi
+
+checkout platform/external/libjpeg-turbo
+
+cd $SRC/platform/external/libjpeg-turbo
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libjpeg-turbo is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "libjpeg-turbo is up to date in AOSP master, copying its work"
+else
+ notice "Updating libjpeg-turbo to $NEW_VERSION"
+
+ rm -f Android.patch
+
+ cd $SRC/platform/external
+ wget https://sourceforge.net/projects/libjpeg-turbo/files/$AOSPVER/libjpeg-turbo-$AOSPVER.tar.gz
+ tar -zxf libjpeg-turbo-$AOSPVER.tar.gz
+
+ cd $SRC/platform/external/libjpeg-turbo
+ diff -ruN -x '.git' -x 'Android.patch' ../libjpeg-turbo-$AOSPVER ./ > Android.patch
+
+ cd $SRC/platform/external
+ wget https://sourceforge.net/projects/libjpeg-turbo/files/$NEW_VERSION/libjpeg-turbo-$NEW_VERSION.tar.gz
+ tar -zxf libjpeg-turbo-$NEW_VERSION.tar.gz
+
+ rm -rf libjpeg-turbo-$AOSPVER libjpeg-turbo-$NEW_VERSION.tar.gz libjpeg-turbo-$AOSPVER.tar.gz
+ cp -rf libjpeg-turbo/Android.patch libjpeg-turbo-$NEW_VERSION
+ cp -rf libjpeg-turbo/.git libjpeg-turbo-$NEW_VERSION
+ rm -rf libjpeg-turbo
+ mv libjpeg-turbo-$NEW_VERSION libjpeg-turbo
+
+
+ cd $SRC/platform/external/libjpeg-turbo
+
+ if patch -p0 < Android.patch; then
+ rm Android.patch
+ notice "Auto-updated libjpeg-turbo to $NEW_VERSION."
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ git commit -asm "Update to libjpeg-turbo $NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update libjpeg-turbo - 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
+git pull
+git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+git branch -D linaro-upstream-work-$TIMESTAMP
+
+pwd
diff --git a/libmpt.sh b/libmpt.sh
new file mode 100755
index 0000000..787cd82
--- /dev/null
+++ b/libmpt.sh
@@ -0,0 +1,66 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(wget -O - --no-verbose -q https://sourceforge.net/projects/libmtp/files/libmtp/ | grep "Download libmtp-[0-9]" | sed -e 's,^ <span>Download libmtp-,,' | sed -e "s/.tar.*//g")
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+checkout platform/external/libmtp
+
+cd $SRC/platform/external/libmtp
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libmtp is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "libmtp is up to date in AOSP master, copying its work"
+else
+ notice "Updating libmtp to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://sourceforge.net/projects/libmtp/files/libmtp/$NEW_VERSION/libmtp-$NEW_VERSION.tar.gz
+ tar -zxf libmtp-$NEW_VERSION.tar.gz
+
+ cd libmtp
+
+ for i in *; do
+ if [ -e ../libmtp-$NEW_VERSION/$i ]; then
+ cp -rf ../libmtp-$NEW_VERSION/$i .
+ fi
+ done
+
+ cp -rf ../libmtp-$NEW_VERSION/util .
+
+ cd $SRC/platform/external
+ rm -rf libmtp-$NEW_VERSION.tar.gz libmtp-$NEW_VERSION
+
+ cd $SRC/platform/external/libmtp
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update libmtp - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file
diff --git a/libogg.sh b/libogg.sh
new file mode 100755
index 0000000..19bc12e
--- /dev/null
+++ b/libogg.sh
@@ -0,0 +1,65 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(latest $( wget -O - --no-verbose -q http://downloads.xiph.org/releases/ogg/ | grep "libogg-[0-9].*.tar.gz" | grep -v 'libogg-[0-9].*.rc[0-9].tar.gz' | grep -v 'libogg-[0-9].*.beta[0-9].tar.gz' | cut -d '=' -f5 | sed -e 's,^"libogg-,,' | sed -e "s/.tar.*//g"))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/libogg
+
+cd $SRC/platform/external/libogg
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libogg is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "libogg is up to date in AOSP master, copying its work"
+else
+ notice "Updating libogg to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://downloads.xiph.org/releases/ogg/libogg-$NEW_VERSION.tar.gz
+ tar -zxf libogg-$NEW_VERSION.tar.gz
+
+ cd libogg
+
+ for i in *; do
+ if [ -e ../libogg-$NEW_VERSION/$i ]; then
+ cp -rf ../libogg-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf libogg-$NEW_VERSION.tar.gz libogg-$NEW_VERSION
+
+ cd $SRC/platform/external/libogg
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update libogg - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file
diff --git a/libopus.sh b/libopus.sh
new file mode 100755
index 0000000..9ab0170
--- /dev/null
+++ b/libopus.sh
@@ -0,0 +1,97 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+cd $SRC/platform/external
+if [ -d libopus-upstream ]; then
+ cd libopus-upstream
+ git checkout master
+ git pull
+else
+ git clone git://git.xiph.org/opus.git libopus-upstream
+ cd libopus-upstream
+fi
+
+NEW_VERSION=$(latest $(git tag |grep -E '^v[0-9]+\.' |sed -e 's,^v,,' |grep -v '[a-z]'))
+echo "NEW_VERSION = $NEW_VERSION"
+
+checkout platform/external/libopus
+
+cd $SRC/platform/external/libopus
+if git branch -a |grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libopus is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+if [ "$NEW_VERSION" = "$AOSPVER" ]; then
+ notice "libopus is up to date in AOSP master, copying its work"
+else
+ LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream |sed -e 's,.*-,,'))
+ if [ -n "$LATEST_LINARO" ]; then
+ if [ "$(latest $LATEST_LINARO $AOSPVER)" != "$AOSPVER" ]; then
+ git checkout linaro-upstream-$LATEST_LINARO || git checkout -b linaro-upstream-$LATEST_LINARO origin/linaro-upstream-$LATEST_LINARO
+ fi
+ fi
+
+ notice "Updating libopus to $NEW_VERSION"
+
+ rm -f Android.patch
+ cd ../libopus-upstream
+ git checkout -b linaro-upstream-work-$TIMESTAMP v$AOSPVER
+ cd ../libopus
+ for i in *; do
+ if [ -e ../libopus-upstream/$i ]; then
+ diff -ruN ../libopus-upstream/$i $i >>Android.patch
+ fi
+ done
+ cd ../libopus-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ git checkout -b linaro-upstream-work-$TIMESTAMP v$NEW_VERSION
+ cd ../libopus
+ for i in *; do
+ if [ -e ../libopus-upstream/$i ]; then
+ cp -rf ../libopus-upstream/$i .
+ fi
+ done
+ if patch -p0 <Android.patch; then
+ rm Android.patch
+ notice "Auto-updated libopus to $NEW_VERSION."
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+ git commit -asm "Update to libopus $NEW_VERSION"
+ git clean -d -f -x
+ else
+ error "Couldn't auto-update libopus - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+ fi
+ cd ../libopus-upstream
+ git checkout master
+ git branch -D linaro-upstream-work-$TIMESTAMP
+ cd ../libopus
+
+
+fi
+
+
+
+git push origin linaro-upstream-work-$TIMESTAMP:linaro-upstream-$NEW_VERSION
+git pull
+git checkout -b linaro-upstream-$NEW_VERSION origin/linaro-upstream-$NEW_VERSION
+git branch -D linaro-upstream-work-$TIMESTAMP
+
+pwd \ No newline at end of file
diff --git a/libusb.sh b/libusb.sh
index 98941e6..eb9c9e8 100755
--- a/libusb.sh
+++ b/libusb.sh
@@ -24,12 +24,19 @@ if [ -d libusb-upstream ]; then
git checkout master
git pull
else
- git clone git://git.libusb.org/libusb.git libusb-upstream
+ #git clone git://git.libusb.org/libusb.git libusb-upstream
+ git clone git://github.com/libusb/libusb.git libusb-upstream
cd libusb-upstream
fi
-NEW_VERSION=$(latest $(git tag | grep ^v | cut -c 2-))
+#NEW_VERSION=$(latest $(git tag | grep ^v | cut -c 2-))
+#NEW_VERSION=$(latest $(git tag | grep ^v | cut -d '-' -f1 | cut -c2-))
+NEW_VERSION=$(grep 'define LIBUSB_MAJOR' libusb/version.h |cut -d' ' -f3).$(grep 'define LIBUSB_MINOR' libusb/version.h |cut -d' ' -f3).$(grep 'define LIBUSB_MICRO' libusb/version.h |cut -d' ' -f3)
+NEW_VERSION_LIBUSB_NANO=$(grep 'define LIBUSB_NANO' libusb/version_nano.h |cut -d' ' -f3)
+NEW_VERSION_LIBUSB_RC=$(grep 'define LIBUSB_RC' libusb/version.h |cut -d' ' -f3 | cut -d \" -f2)
echo "NEW_VERSION = $NEW_VERSION"
+echo "NEW_VERSION_LIBUSB_RC = $NEW_VERSION_LIBUSB_RC"
+echo "NEW_VERSION_LIBUSB_NANO = $NEW_VERSION_LIBUSB_NANO"
checkout platform/external/libusb
@@ -41,12 +48,22 @@ fi
git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
-AOSPVER=$(grep PACKAGE_VERSION config.h | cut -d \" -f2)
+#AOSPVER=$(grep PACKAGE_VERSION config.h | cut -d \" -f2)
+AOSPVER=$(grep 'define LIBUSB_MAJOR' libusb/version.h |cut -d' ' -f3).$(grep 'define LIBUSB_MINOR' libusb/version.h |cut -d' ' -f3).$(grep 'define LIBUSB_MICRO' libusb/version.h |cut -d' ' -f3)
+AOSPVER_LIBUSB_NANO=$(grep 'define LIBUSB_NANO' libusb/version_nano.h |cut -d' ' -f3)
+AOSPVER_LIBUSB_RC=$(grep 'define LIBUSB_RC' libusb/version.h |cut -d' ' -f3 | cut -d \" -f2)
echo "AOSPVER = $AOSPVER"
+echo "AOSPVER_LIBUSB_RC = $AOSPVER_LIBUSB_RC"
+echo "AOSPVER_LIBUSB_NANO = $AOSPVER_LIBUSB_NANO"
-if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+if [ "$(vertonumber $NEW_VERSION)" -lt "$(vertonumber $AOSPVER)" ]; then
notice "libusb is up to date in AOSP master, copying its work"
else
+ if [[ "$(vertonumber $NEW_VERSION)" -eq "$(vertonumber $AOSPVER)" ]] && [[ "$NEW_VERSION_LIBUSB_NANO" -le "$AOSPVER_LIBUSB_NANO" ]]; then
+ notice "libusb is up to date in AOSP master, copying its work"
+ exit 0
+ fi
+
LATEST_LINARO=$(latest $(git branch -a |grep origin/linaro-upstream |sed -e 's,.*-,,'))
echo "LATEST_LINARO = $LATEST_LINARO"
if [ -n "$LATEST_LINARO" ]; then
@@ -58,7 +75,7 @@ else
rm -f Android.patch
cd ../libusb-upstream
- git checkout -b linaro-upstream-work-$TIMESTAMP $(numbertover $AOSPVER)
+ git checkout -b linaro-upstream-work-$TIMESTAMP $(numbertover $AOSPVER$AOSPVER_LIBUSB_RC)
cd ../libusb
diff -ruN ../libusb-upstream/libusb libusb > Android.patch
@@ -66,14 +83,14 @@ else
cd ../libusb-upstream
git checkout master
git branch -D linaro-upstream-work-$TIMESTAMP
- git checkout -b linaro-upstream-work-$TIMESTAMP $(numbertover $NEW_VERSION)
+ git checkout -b linaro-upstream-work-$TIMESTAMP $(numbertover $NEW_VERSION$NEW_VERSION_LIBUSB_RC)
cd ../libusb
rm -rf libusb
cp -rf ../libusb-upstream/libusb .
if patch -p0 < Android.patch; then
- notice "Auto-updated libusb to $NEW_VERSION."
+ notice "Auto-updated libusb to $NEW_VERSION$NEW_VERSION_LIBUSB_RC."
git commit -asm "Update to libusb $NEW_VERSION"
git clean -d -f -x
else
diff --git a/libxml2.sh b/libxml2.sh
new file mode 100755
index 0000000..65e2736
--- /dev/null
+++ b/libxml2.sh
@@ -0,0 +1,66 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(latest $(curl ftp://xmlsoft.org/libxml2/ | grep "LATEST_LIBXML2" | cut -d'>' -f2 | sed -e 's,^ libxml2-,,' | sed -e "s/.tar.*//g"))
+
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+checkout platform/external/libxml2
+
+cd $SRC/platform/external/libxml2
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "libxml2 is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "libxml2 is up to date in AOSP master, copying its work"
+else
+ notice "Updating libxml2 to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget ftp://xmlsoft.org/libxml2/libxml2-$NEW_VERSION.tar.gz
+ tar -zxf libxml2-$NEW_VERSION.tar.gz
+
+ cd libxml2
+
+ for i in *; do
+ if [ -e ../libxml2-$NEW_VERSION/$i ]; then
+ cp -rf ../libxml2-$NEW_VERSION/$i .
+ fi
+ done
+
+ cd $SRC/platform/external
+ rm -rf libxml2-$NEW_VERSION.tar.gz libxml2-$NEW_VERSION
+
+ cd $SRC/platform/external/libxml2
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update libxml2 - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file
diff --git a/pcre.sh b/pcre.sh
index 8ceb65b..d5e7457 100755
--- a/pcre.sh
+++ b/pcre.sh
@@ -8,7 +8,7 @@ vertonumber () {
echo -n $V
}
-NEW_VERSION=$(latest $(curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ | grep pcre- | cut -d "-" -f8 | cut -d . -f1,2))
+NEW_VERSION=$(latest $(curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ | egrep 'pcre-|pcre2-' | cut -d "-" -f8 | cut -d . -f1,2))
echo "NEW_VERSION = $NEW_VERSION"
checkout platform/external/pcre
@@ -22,24 +22,25 @@ fi
git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
-AOSPVER=$(grep PACKAGE_VERSION config.h | cut -d \" -f2)
+#AOSPVER=$(grep PACKAGE_VERSION config.h | cut -d \" -f2)
+AOSPVER=$(grep Version: README.version | cut -d ' ' -f2)
echo "AOSPVER = $AOSPVER"
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
+ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-$AOSPVER.tar.bz2
+ tar -jxvf pcre2-$AOSPVER.tar.bz2
- diff -rubN pcre-$AOSPVER dist > Android.patch
+ diff -rubN pcre2-$AOSPVER dist2 > 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
+ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-$NEW_VERSION.tar.bz2
+ tar -jxvf pcre2-$NEW_VERSION.tar.bz2
- rm -rf pcre-$NEW_VERSION.tar.bz2 pcre-$AOSPVER.tar.bz2 pcre-$AOSPVER
- rm -rf dist pcre-$AOSPVER
- mv pcre-$NEW_VERSION dist
+ rm -rf pcre2-$NEW_VERSION.tar.bz2 pcre2-$AOSPVER.tar.bz2 pcre2-$AOSPVER
+ rm -rf dist2 pcre2-$AOSPVER
+ mv pcre2-$NEW_VERSION dist2
if patch -p0 < Android.patch; then
rm Android.patch
diff --git a/tremolo.sh b/tremolo.sh
new file mode 100755
index 0000000..643caa0
--- /dev/null
+++ b/tremolo.sh
@@ -0,0 +1,65 @@
+. $(dirname $0)/functions
+
+vertonumber () {
+ local VERSIONID=$1
+ local V1=$(echo $VERSIONID | cut -d. -f1)
+ local V2=$(echo $VERSIONID | cut -d. -f2)
+ local V3=$(echo $VERSIONID | cut -d. -f3)
+ local V="$V1$V2$V3"
+ echo -n $V
+}
+
+
+NEW_VERSION=$(latest $(wget -O - --no-verbose -q http://wss.co.uk/pinknoise/tremolo | grep "Tremolo[0-9].*.zip" | cut -d'>' -f3 | cut -d'<' -f1 | sed -e 's,^v,,'))
+if [ -z "$NEW_VERSION" ]; then
+ echo "Can't determine current version, probably the website has been edited."
+ echo "Please fix the $0 script."
+ exit 1
+fi
+echo "NEW_VERSION = $NEW_VERSION"
+
+
+
+
+checkout platform/external/tremolo
+
+cd $SRC/platform/external/tremolo
+
+if git branch -a | grep -q linaro-upstream-$NEW_VERSION; then
+ ok "tremolo is up to date."
+ exit 0
+fi
+
+git checkout -b linaro-upstream-work-$TIMESTAMP aosp/master
+
+AOSPVER=$(grep "Version:" README.version | cut -d ' ' -f2)
+echo "AOSPVER = $AOSPVER"
+
+if [ "$(vertonumber $NEW_VERSION)" -le "$(vertonumber $AOSPVER)" ]; then
+ notice "tremolo is up to date in AOSP master, copying its work"
+else
+ notice "Updating tremolo to $NEW_VERSION"
+
+ cd $SRC/platform/external
+ wget http://wss.co.uk/pinknoise/tremolo/Tremolo$(vertonumber $NEW_VERSION).zip
+ unzip Tremolo$(vertonumber $NEW_VERSION).zip -d Tremolo$(vertonumber $NEW_VERSION)
+
+ rm -rf src zlib-$AOSPVER zlib-$NEW_VERSION.tar.xz zlib-$AOSPVER.tar.gz
+
+ cd tremolo
+ rm -rf Tremolo
+
+ mv ../Tremolo$(vertonumber $NEW_VERSION) Tremolo
+
+ cd $SRC/platform/external
+ rm -rf Tremolo$(vertonumber $NEW_VERSION).zip
+
+ cd $SRC/platform/external/tremolo
+ sed -i -e 's/'$AOSPVER'/'$NEW_VERSION'/g' README.version
+
+ error "Couldn't auto-update tremolo - patch failed to apply."
+ error "Please fix manually and commit to a branch called"
+ error "linaro-upstream-$NEW_VERSION."
+ exit 1
+
+fi \ No newline at end of file