[Android] compile.sh: move functions to the top of the file
Filip Roséen
git at videolan.org
Tue Aug 9 07:19:07 CEST 2016
vlc-android | branch: master | Filip Roséen <filip at atch.se> | Tue Aug 9 04:01:49 2016 +0200| [495c003cf3b4aceaa88a4f94d74876f4dfbf1911] | committer: Jean-Baptiste Kempf
compile.sh: move functions to the top of the file
Given that it is always nice to have helper functions declared in the
same area, these changes makes it so that "diagnostic" and "checkfail"
is defined at the same place.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> https://code.videolan.org/videolan/vlc-android/commit/495c003cf3b4aceaa88a4f94d74876f4dfbf1911
---
compile.sh | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/compile.sh b/compile.sh
index 029464f..64c86c2 100755
--- a/compile.sh
+++ b/compile.sh
@@ -1,11 +1,23 @@
#! /bin/sh
set -e
+#############
+# FUNCTIONS #
+#############
+
diagnostic()
{
echo "$@" 1>&2;
}
+checkfail()
+{
+ if [ ! $? -eq 0 ];then
+ diagnostic "$1"
+ exit 1
+ fi
+}
+
# Read the Android Wiki http://wiki.videolan.org/AndroidCompile
# Setup all that stuff correctly.
# Get the latest Android SDK Platform or modify numbers in configure.sh and libvlc/default.properties.
@@ -68,18 +80,6 @@ if [ -z "$ANDROID_ABI" ]; then
ANDROID_ABI="armeabi-v7a"
fi
-#############
-# FUNCTIONS #
-#############
-
-checkfail()
-{
- if [ ! $? -eq 0 ];then
- echo "$1"
- exit 1
- fi
-}
-
##########
# GRADLE #
##########
More information about the Android
mailing list