Browse Source

termux-tools: Quote $@ when sending from wrappers

Fixes https://github.com/termux/termux-api/issues/18
android-5
Fredrik Fornwall 9 years ago
parent
commit
0ae97c5e98
  1. 2
      build-package.sh
  2. 7
      packages/termux-elf-cleaner/build.sh
  3. 0
      packages/termux-elf-cleaner/termux-elf-cleaner.cpp
  4. 11
      packages/termux-tools/build.sh

2
build-package.sh

@ -273,7 +273,7 @@ HERE
fi
TERMUX_ELF_CLEANER=$TERMUX_COMMON_CACHEDIR/termux-elf-cleaner
TERMUX_ELF_CLEANER_SRC=$TERMUX_SCRIPTDIR/packages/termux-tools/termux-elf-cleaner.cpp
TERMUX_ELF_CLEANER_SRC=$TERMUX_SCRIPTDIR/packages/termux-elf-cleaner/termux-elf-cleaner.cpp
if [ $TERMUX_ELF_CLEANER_SRC -nt $TERMUX_ELF_CLEANER ]; then
g++ -std=c++11 -Wall -Wextra -pedantic -Os $TERMUX_ELF_CLEANER_SRC -o $TERMUX_ELF_CLEANER
fi

7
packages/termux-elf-cleaner/build.sh

@ -0,0 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Cleaner of ELF files for Android"
TERMUX_PKG_VERSION=1.0
termux_step_make_install () {
$CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner
}

0
packages/termux-tools/termux-elf-cleaner.cpp → packages/termux-elf-cleaner/termux-elf-cleaner.cpp

11
packages/termux-tools/build.sh

@ -1,10 +1,9 @@
TERMUX_PKG_HOMEPAGE=http://termux.com/
TERMUX_PKG_DESCRIPTION="Some tools for Termux"
TERMUX_PKG_VERSION=0.26
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_VERSION=0.27
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
termux_step_make_install () {
$CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
# with system libraries that am may link against.
for tool in am dalvikvm df getprop logcat ping ping6 ip pm settings; do
@ -19,7 +18,7 @@ termux_step_make_install () {
# at least am&pm on a Nexus 6p running Android 6.0:
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
echo "exec /system/bin/$tool \$@" >> $WRAPPER_FILE
echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE
chmod +x $TERMUX_PREFIX/bin/$tool
done

Loading…
Cancel
Save