[Android] compile-libvlc: Use $() instead of backticks
Marvin Scholz
git at videolan.org
Fri Oct 18 17:34:46 CEST 2019
vlc-android | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Oct 18 16:43:49 2019 +0200| [7dfcf80b18a7a8572c1e23dafef6ac438574b43a] | committer: Marvin Scholz
compile-libvlc: Use $() instead of backticks
> https://code.videolan.org/videolan/vlc-android/commit/7dfcf80b18a7a8572c1e23dafef6ac438574b43a
---
compile-libvlc.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 39e378225..f2221ddb0 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -48,9 +48,9 @@ if [ -z "$MAKEFLAGS" ]; then
UNAMES=$(uname -s)
MAKEFLAGS=
if which nproc >/dev/null; then
- MAKEFLAGS=-j`nproc`
+ MAKEFLAGS=-j$(nproc)
elif [ "$UNAMES" == "Darwin" ] && which sysctl >/dev/null; then
- MAKEFLAGS=-j`sysctl -n machdep.cpu.thread_count`
+ MAKEFLAGS=-j$(sysctl -n machdep.cpu.thread_count)
fi
fi
@@ -116,7 +116,7 @@ else
exit 1
fi
-VLC_BUILD_DIR=`realpath $VLC_SRC_DIR/build-android-${TARGET_TUPLE}`
+VLC_BUILD_DIR=$(realpath $VLC_SRC_DIR/build-android-${TARGET_TUPLE})
VLC_OUT_PATH="$VLC_BUILD_DIR/ndk"
mkdir -p $VLC_OUT_PATH
VLC_OUT_LDLIBS="-L$VLC_OUT_PATH/libs/${ANDROID_ABI} -lvlc"
@@ -235,7 +235,7 @@ avlc_make_toolchain()
{
NDK_TOOLCHAIN_PROPS=${NDK_TOOLCHAIN_DIR}/source.properties
NDK_FORCE_ARG=
-if [ "`cat \"${NDK_TOOLCHAIN_PROPS}\" 2>/dev/null`" != "`cat \"${ANDROID_NDK}/source.properties\"`" ];then
+if [ "$(cat \"${NDK_TOOLCHAIN_PROPS}\" 2>/dev/null)" != "$(cat \"${ANDROID_NDK}/source.properties\")" ];then
echo "NDK changed, making new toolchain"
NDK_FORCE_ARG="--force"
fi
@@ -261,7 +261,7 @@ fi
avlc_find_modules()
{
- echo "`find $1 -name 'lib*plugin.a' | grep -vE "lib(${blacklist_regexp})_plugin.a" | tr '\n' ' '`"
+ echo "$(find $1 -name 'lib*plugin.a' | grep -vE "lib(${blacklist_regexp})_plugin.a" | tr '\n' ' ')"
}
avlc_get_symbol()
@@ -276,7 +276,7 @@ echo "Name: $1
Description: $1
Version: $2
Libs: -l$1
-Cflags:" > contrib/${TARGET_TUPLE}/lib/pkgconfig/`echo $1|tr 'A-Z' 'a-z'`.pc
+Cflags:" > contrib/${TARGET_TUPLE}/lib/pkgconfig/$(echo $1|tr 'A-Z' 'a-z').pc
}
avlc_build()
@@ -641,8 +641,8 @@ VLC_MODULES=$(avlc_find_modules ${VLC_BUILD_DIR}/modules)
DEFINITION="";
BUILTINS="const void *vlc_static_modules[] = {\n";
for file in $VLC_MODULES; do
- outfile=${REDEFINED_VLC_MODULES_DIR}/`basename $file`
- name=`echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//'`;
+ outfile=${REDEFINED_VLC_MODULES_DIR}/$(basename $file)
+ name=$(echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//');
symbols=$("${CROSS_TOOLS}nm" -g $file)
# assure that all modules have differents symbol names
@@ -677,7 +677,7 @@ printf "/* Autogenerated from the list of modules */\n#include <unistd.h>\n$DEFI
DEFINITION=""
BUILTINS="const void *libvlc_functions[] = {\n";
-for func in `cat $VLC_SRC_DIR/lib/libvlc.sym`
+for func in $(cat $VLC_SRC_DIR/lib/libvlc.sym)
do
DEFINITION=$DEFINITION"int $func(void);\n";
BUILTINS="$BUILTINS $func,\n";
@@ -692,7 +692,7 @@ rm ${REDEFINED_VLC_MODULES_DIR}/syms
###########################
VLC_MODULES=$(avlc_find_modules ${REDEFINED_VLC_MODULES_DIR})
-VLC_CONTRIB_LDFLAGS=`for i in $(/bin/ls $VLC_CONTRIB/lib/pkgconfig/*.pc); do PKG_CONFIG_PATH="$VLC_CONTRIB/lib/pkgconfig/" pkg-config --libs $i; done |xargs`
+VLC_CONTRIB_LDFLAGS=$(for i in $(/bin/ls $VLC_CONTRIB/lib/pkgconfig/*.pc); do PKG_CONFIG_PATH="$VLC_CONTRIB/lib/pkgconfig/" pkg-config --libs $i; done |xargs)
echo -e "ndk-build vlc"
touch $VLC_OUT_PATH/dummy.cpp
More information about the Android
mailing list