Browse Source

build-package.sh: Create $PREFIX/libexec

android-5
Fredrik Fornwall 10 years ago
parent
commit
cd83eaf669
  1. 2
      build-package.sh
  2. 19
      packages/termux-api/termux-send-text

2
build-package.sh

@ -183,7 +183,7 @@ TERMUX_PKG_MAINTAINER="Fredrik Fornwall <fredrik@fornwall.net>"
# Cleanup old state # Cleanup old state
rm -Rf $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_SRCDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_MASSAGEDIR rm -Rf $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_SRCDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_MASSAGEDIR
# Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build) # Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build)
mkdir -p $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_CACHEDIR $TERMUX_PKG_MASSAGEDIR $PKG_CONFIG_LIBDIR $TERMUX_PREFIX/{bin,etc,lib,share,tmp} mkdir -p $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_CACHEDIR $TERMUX_PKG_MASSAGEDIR $PKG_CONFIG_LIBDIR $TERMUX_PREFIX/{bin,etc,lib,libexec,share,tmp}
# If $TERMUX_PREFIX already exists, it may have been built for a different arch # If $TERMUX_PREFIX already exists, it may have been built for a different arch
TERMUX_ARCH_FILE=/data/TERMUX_ARCH TERMUX_ARCH_FILE=/data/TERMUX_ARCH

19
packages/termux-api/termux-send-text

@ -1,19 +0,0 @@
#!/system/bin/sh
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: termux-send-text [TEXT]"
echo "Send text to the Android system as arguments or standard input"
exit
fi
DATA="$@"
if [ -z "$DATA" ]; then
DATA="`cat -`"
fi
unset LD_LIBRARY_PATH
am start --user 0 \
-a android.intent.action.SEND \
-t "text/plain" \
--es android.intent.extra.TEXT "$DATA" \
> /dev/null
Loading…
Cancel
Save