From 7358bbfd129e6b60c99f5a8f4633115fde408fde Mon Sep 17 00:00:00 2001 From: Munchax10 <79412545+Munchax10@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:50:20 +0300 Subject: [PATCH 1/2] Create termux-bluetooth-scan.in --- scripts/termux-bluetooth-scan.in | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/termux-bluetooth-scan.in diff --git a/scripts/termux-bluetooth-scan.in b/scripts/termux-bluetooth-scan.in new file mode 100644 index 0000000..9446abf --- /dev/null +++ b/scripts/termux-bluetooth-scan.in @@ -0,0 +1,25 @@ +#!@TERMUX_PREFIX@/bin/sh +set -e -u + +SCRIPTNAME=termux-bluetooth-scan +show_usage () { + echo "Usage: $SCRIPTNAME " + echo "Scan for Bluetooth devices." + exit 0 +} + +while getopts :h option +do + case "$option" in + h) show_usage;; + ?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1; + esac +done +shift $((OPTIND-1)) + +if [ $# = 1 ]; then + @TERMUX_PREFIX@/libexec/termux-api BluetoothScan --es mode "$1" +else + echo "$SCRIPTNAME: You didnt specify the mode to use." >&2 + exit 1 +fi From d5d3d44bbdd99b4b5722b1df4fb22589d26fc5a5 Mon Sep 17 00:00:00 2001 From: Munchax10 <79412545+Munchax10@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:50:47 +0300 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8b1f9e..71cf4a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ set(script_files scripts/termux-api-stop scripts/termux-audio-info scripts/termux-battery-status + scripts/termux-bluetooth-scan scripts/termux-brightness scripts/termux-call-log scripts/termux-camera-info