Set path to termux-api executable

This commit is contained in:
Fredrik Fornwall 2017-04-09 19:00:20 +02:00
parent fc464cc316
commit 6f6777319a
21 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 "$@"

View File

@ -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 "$@"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"`"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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