From 6f6777319a69c5ec75927387ba890a81cf4a809e Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 9 Apr 2017 19:00:20 +0200 Subject: [PATCH] Set path to termux-api executable --- scripts/termux-battery-status | 2 +- scripts/termux-camera-info | 2 +- scripts/termux-camera-photo | 2 +- scripts/termux-clipboard-get | 2 +- scripts/termux-clipboard-set | 2 +- scripts/termux-contact-list | 2 +- scripts/termux-dialog | 2 +- scripts/termux-download | 2 +- scripts/termux-infrared-frequencies | 2 +- scripts/termux-infrared-transmit | 2 +- scripts/termux-location | 2 +- scripts/termux-share | 4 ++-- scripts/termux-sms-inbox | 2 +- scripts/termux-sms-send | 2 +- scripts/termux-storage-get | 2 +- scripts/termux-telephony-cellinfo | 2 +- scripts/termux-telephony-deviceinfo | 2 +- scripts/termux-toast | 2 +- scripts/termux-tts-engines | 2 +- scripts/termux-tts-speak | 2 +- scripts/termux-vibrate | 2 +- 21 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/termux-battery-status b/scripts/termux-battery-status index 0c6ff5f..9e0614c 100755 --- a/scripts/termux-battery-status +++ b/scripts/termux-battery-status @@ -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 diff --git a/scripts/termux-camera-info b/scripts/termux-camera-info index bafcbf9..437d556 100755 --- a/scripts/termux-camera-info +++ b/scripts/termux-camera-info @@ -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 diff --git a/scripts/termux-camera-photo b/scripts/termux-camera-photo index 51c28d9..645853d 100755 --- a/scripts/termux-camera-photo +++ b/scripts/termux-camera-photo @@ -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 diff --git a/scripts/termux-clipboard-get b/scripts/termux-clipboard-get index 042e51f..8a19581 100755 --- a/scripts/termux-clipboard-get +++ b/scripts/termux-clipboard-get @@ -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 diff --git a/scripts/termux-clipboard-set b/scripts/termux-clipboard-set index 94727aa..21b27d1 100755 --- a/scripts/termux-clipboard-set +++ b/scripts/termux-clipboard-set @@ -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 diff --git a/scripts/termux-contact-list b/scripts/termux-contact-list index ac8c637..1dc8014 100755 --- a/scripts/termux-contact-list +++ b/scripts/termux-contact-list @@ -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 diff --git a/scripts/termux-dialog b/scripts/termux-dialog index ddbb824..1932401 100755 --- a/scripts/termux-dialog +++ b/scripts/termux-dialog @@ -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 "$@" diff --git a/scripts/termux-download b/scripts/termux-download index c75a6c5..afff2ac 100755 --- a/scripts/termux-download +++ b/scripts/termux-download @@ -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 "$@" diff --git a/scripts/termux-infrared-frequencies b/scripts/termux-infrared-frequencies index b8b095d..ab6b6f4 100755 --- a/scripts/termux-infrared-frequencies +++ b/scripts/termux-infrared-frequencies @@ -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 diff --git a/scripts/termux-infrared-transmit b/scripts/termux-infrared-transmit index 590a73c..8f6fcdb 100755 --- a/scripts/termux-infrared-transmit +++ b/scripts/termux-infrared-transmit @@ -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 diff --git a/scripts/termux-location b/scripts/termux-location index 6e15239..b02956e 100755 --- a/scripts/termux-location +++ b/scripts/termux-location @@ -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 diff --git a/scripts/termux-share b/scripts/termux-share index 637a3ff..6907bb8 100755 --- a/scripts/termux-share +++ b/scripts/termux-share @@ -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 diff --git a/scripts/termux-sms-inbox b/scripts/termux-sms-inbox index e3547c2..10c02d1 100755 --- a/scripts/termux-sms-inbox +++ b/scripts/termux-sms-inbox @@ -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 diff --git a/scripts/termux-sms-send b/scripts/termux-sms-send index 034e708..33d9da4 100755 --- a/scripts/termux-sms-send +++ b/scripts/termux-sms-send @@ -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 diff --git a/scripts/termux-storage-get b/scripts/termux-storage-get index ce49af8..4ec9977 100755 --- a/scripts/termux-storage-get +++ b/scripts/termux-storage-get @@ -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"`" diff --git a/scripts/termux-telephony-cellinfo b/scripts/termux-telephony-cellinfo index 09d2e3e..1d394b8 100755 --- a/scripts/termux-telephony-cellinfo +++ b/scripts/termux-telephony-cellinfo @@ -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 diff --git a/scripts/termux-telephony-deviceinfo b/scripts/termux-telephony-deviceinfo index 9dff285..4f303ad 100755 --- a/scripts/termux-telephony-deviceinfo +++ b/scripts/termux-telephony-deviceinfo @@ -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 diff --git a/scripts/termux-toast b/scripts/termux-toast index 6473cf5..368c8ef 100755 --- a/scripts/termux-toast +++ b/scripts/termux-toast @@ -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 diff --git a/scripts/termux-tts-engines b/scripts/termux-tts-engines index 39c72c4..e62fbc1 100755 --- a/scripts/termux-tts-engines +++ b/scripts/termux-tts-engines @@ -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 diff --git a/scripts/termux-tts-speak b/scripts/termux-tts-speak index da18ade..4bfafa6 100755 --- a/scripts/termux-tts-speak +++ b/scripts/termux-tts-speak @@ -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 diff --git a/scripts/termux-vibrate b/scripts/termux-vibrate index 83c9473..74896c9 100755 --- a/scripts/termux-vibrate +++ b/scripts/termux-vibrate @@ -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