[Android] Abort git-am if applying the patches failed

Edward Wang git at videolan.org
Sat Jul 21 17:09:19 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sat Jul 21 11:09:15 2012 -0400| [1683ad70726aa4486e0eee1e4c9539c6a87f4c89] | committer: Edward Wang

Abort git-am if applying the patches failed

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=1683ad70726aa4486e0eee1e4c9539c6a87f4c89
---

 compile.sh |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compile.sh b/compile.sh
index 3548d3b..ff7bd92 100755
--- a/compile.sh
+++ b/compile.sh
@@ -44,6 +44,11 @@ if [ ! -d "vlc" ]; then
     git checkout -B android ${TESTED_HASH}
     echo "Applying the patches"
     git am ../patches/*.patch
+    if [ $? -ne 0 ]; then
+        git am --abort
+        echo "Applying the patches failed, aborting git-am"
+        exit 1
+    fi
 else
     echo "VLC source found"
     cd vlc



More information about the Android mailing list