mirror of
https://github.com/danog/termux-api-package.git
synced 2024-11-29 20:29:00 +01:00
Set path to termux-api executable
This commit is contained in:
parent
fc464cc316
commit
6f6777319a
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ BatteryStatus
|
||||
/data/data/com.termux/files/usr/libexec/termux-api BatteryStatus
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ CameraInfo
|
||||
/data/data/com.termux/files/usr/libexec/termux-api CameraInfo
|
||||
|
@ -27,4 +27,4 @@ if [ $# != 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
touch $1
|
||||
PARAMS="$PARAMS --es file `realpath $1`"
|
||||
|
||||
@TERMUX_API@ CameraPhoto $PARAMS
|
||||
/data/data/com.termux/files/usr/libexec/termux-api CameraPhoto $PARAMS
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ Clipboard
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Clipboard
|
||||
|
@ -17,7 +17,7 @@ do
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
CMD="@TERMUX_API@ Clipboard -e api_version 2 --ez set true"
|
||||
CMD="/data/data/com.termux/files/usr/libexec/termux-api Clipboard -e api_version 2 --ez set true"
|
||||
if [ $# = 0 ]; then
|
||||
$CMD
|
||||
else
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ ContactList
|
||||
/data/data/com.termux/files/usr/libexec/termux-api ContactList
|
||||
|
@ -40,4 +40,4 @@ set -- $ARG_M $ARG_P
|
||||
if [ -n "$ARG_I" ]; then set -- "$@" $ARG_I "$OPT_I"; fi
|
||||
if [ -n "$ARG_T" ]; then set -- "$@" $ARG_T "$OPT_T"; fi
|
||||
|
||||
@TERMUX_API@ Dialog "$@"
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Dialog "$@"
|
||||
|
@ -36,4 +36,4 @@ if [ -n "$ARG_D" ]; then set -- "$@" $ARG_D "$OPT_D"; fi
|
||||
if [ -n "$ARG_T" ]; then set -- "$@" $ARG_T "$OPT_T"; fi
|
||||
set -- "$@" $URL_TO_DOWNLOAD
|
||||
|
||||
@TERMUX_API@ Download "$@"
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Download "$@"
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ InfraredFrequencies
|
||||
/data/data/com.termux/files/usr/libexec/termux-api InfraredFrequencies
|
||||
|
@ -25,4 +25,4 @@ if [ -z "$FREQUENCY" ]; then echo "$SCRIPTNAME: No frequency specified"; exit 1;
|
||||
if [ $# -lt 1 ]; then echo "$SCRIPTNAME: too few arguments"; exit 1; fi
|
||||
if [ $# -gt 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ InfraredTransmit $FREQUENCY --eia pattern $1
|
||||
/data/data/com.termux/files/usr/libexec/termux-api InfraredTransmit $FREQUENCY --eia pattern $1
|
||||
|
@ -45,4 +45,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ Location $PARAMS
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Location $PARAMS
|
||||
|
@ -43,7 +43,7 @@ if [ $# -gt 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
if [ $# != 0 ]; then
|
||||
# Note that the file path can contain whitespace.
|
||||
@TERMUX_API@ Share $PARAMS --es file "`realpath "$1"`"
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Share $PARAMS --es file "`realpath "$1"`"
|
||||
else
|
||||
@TERMUX_API@ Share $PARAMS
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Share $PARAMS
|
||||
fi
|
||||
|
@ -32,4 +32,4 @@ shift $(($OPTIND-1))
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
PARAMS="$PARAMS --ei offset $PARAM_OFFSET --ei limit $PARAM_LIMIT"
|
||||
@TERMUX_API@ SmsInbox $PARAMS
|
||||
/data/data/com.termux/files/usr/libexec/termux-api SmsInbox $PARAMS
|
||||
|
@ -24,7 +24,7 @@ if [ -z "$RECIPIENTS" ]; then
|
||||
echo "$SCRIPTNAME: no recipient number given"; exit 1;
|
||||
fi
|
||||
|
||||
CMD="@TERMUX_API@ SmsSend $RECIPIENTS"
|
||||
CMD="/data/data/com.termux/files/usr/libexec/termux-api SmsSend $RECIPIENTS"
|
||||
if [ $# = 0 ]; then
|
||||
$CMD
|
||||
else
|
||||
|
@ -21,4 +21,4 @@ shift $(($OPTIND-1))
|
||||
if [ $# -gt 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
if [ $# -lt 1 ]; then echo "$SCRIPTNAME: no output file specified"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ StorageGet --es file "`realpath "$1"`"
|
||||
/data/data/com.termux/files/usr/libexec/termux-api StorageGet --es file "`realpath "$1"`"
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ TelephonyCellInfo
|
||||
/data/data/com.termux/files/usr/libexec/termux-api TelephonyCellInfo
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ TelephonyDeviceInfo
|
||||
/data/data/com.termux/files/usr/libexec/termux-api TelephonyDeviceInfo
|
||||
|
@ -20,7 +20,7 @@ do
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
CMD="@TERMUX_API@ Toast $PARAMS"
|
||||
CMD="/data/data/com.termux/files/usr/libexec/termux-api Toast $PARAMS"
|
||||
if [ $# = 0 ]; then
|
||||
$CMD
|
||||
else
|
||||
|
@ -19,4 +19,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ TextToSpeech --es engine LIST_AVAILABLE
|
||||
/data/data/com.termux/files/usr/libexec/termux-api TextToSpeech --es engine LIST_AVAILABLE
|
||||
|
@ -40,7 +40,7 @@ do
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
CMD="@TERMUX_API@ TextToSpeech $PARAMS"
|
||||
CMD="/data/data/com.termux/files/usr/libexec/termux-api TextToSpeech $PARAMS"
|
||||
if [ $# = 0 ]; then
|
||||
$CMD
|
||||
else
|
||||
|
@ -25,4 +25,4 @@ shift $(($OPTIND-1))
|
||||
|
||||
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||
|
||||
@TERMUX_API@ Vibrate $PARAMS
|
||||
/data/data/com.termux/files/usr/libexec/termux-api Vibrate $PARAMS
|
||||
|
Loading…
Reference in New Issue
Block a user