termux-packages/packages/termux-api/build.sh
Fredrik Fornwall 9228c43493 termux-api: Change termux-clipboard-set
Make termux-clipboard-set set the clipboard to the arguments if
given, and only take stdin as input if no arguments given.

Closes https://github.com/termux/termux-api/issues/8
2015-12-29 18:15:33 -05:00

15 lines
567 B
Bash

TERMUX_PKG_HOMEPAGE=http://termux.com/add-ons/api/
TERMUX_PKG_DESCRIPTION="Termux API commands"
TERMUX_PKG_VERSION=0.10
termux_step_make_install () {
mkdir -p $TERMUX_PREFIX/bin
local TERMUX_API_BINARY=$TERMUX_PREFIX/libexec/termux-api
cd $TERMUX_PKG_BUILDER_DIR
for file in `ls termux-* | grep -v termux-api.c`; do
sed "s|@TERMUX_API@|$TERMUX_API_BINARY|" $file > $TERMUX_PREFIX/bin/$file
chmod +x $TERMUX_PREFIX/bin/$file
done
$CC $CFLAGS -std=c11 -Wall -Wextra -pedantic -Werror $LDFLAGS termux-api.c -o $TERMUX_API_BINARY
}