apksigner: fix word splitting in script (#7069)

Any argument with an IFS char in it used to get resplit when passed to apksigner.
Adding quotes around `$@` preserves the intended arguments.
This commit is contained in:
FriendlyNeighborhoodShane 2021-06-28 23:59:27 +05:30 committed by GitHub
parent 4c28d839f1
commit 69fa8961d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="APK signing tool"
TERMUX_PKG_LICENSE="Apache-2.0, GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=${TERMUX_ANDROID_BUILD_TOOLS_VERSION}
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
@ -66,7 +66,7 @@ termux_step_make_install() {
mv apksigner.jar $TERMUX_PREFIX/share/dex/apksigner.jar
echo '#!/bin/sh' > $TERMUX_PREFIX/bin/apksigner
echo "dalvikvm -Xcompiler-option --compiler-filter=speed -cp $TERMUX_PREFIX/share/dex/apksigner.jar com.android.apksigner.ApkSignerTool \$@" >> $TERMUX_PREFIX/bin/apksigner
echo "dalvikvm -Xcompiler-option --compiler-filter=speed -cp $TERMUX_PREFIX/share/dex/apksigner.jar com.android.apksigner.ApkSignerTool \"\$@\"" >> $TERMUX_PREFIX/bin/apksigner
chmod +x $TERMUX_PREFIX/bin/apksigner
}