From c73fd5105827d1979f3f41fb324b04d944c7c7b9 Mon Sep 17 00:00:00 2001 From: Jeevitha Kannan K S Date: Wed, 20 Nov 2024 11:40:24 +0530 Subject: [PATCH] Add bluez package to arch linux --- core/tabs/common-service-script.sh | 2 +- core/tabs/utils/bluetooth-control.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/tabs/common-service-script.sh b/core/tabs/common-service-script.sh index c3a2053d..d81e9c34 100644 --- a/core/tabs/common-service-script.sh +++ b/core/tabs/common-service-script.sh @@ -82,4 +82,4 @@ isServiceActive() { esac } -checkInitManager 'systemctl rc-service' \ No newline at end of file +checkInitManager 'systemctl rc-service' diff --git a/core/tabs/utils/bluetooth-control.sh b/core/tabs/utils/bluetooth-control.sh index 7545e914..d38e7d9b 100644 --- a/core/tabs/utils/bluetooth-control.sh +++ b/core/tabs/utils/bluetooth-control.sh @@ -8,7 +8,7 @@ setupBluetooth() { if ! command_exists bluetoothctl; then case "$PACKAGER" in pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm bluez-utils + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm bluez bluez-utils ;; apk) "$ESCALATION_TOOL" "$PACKAGER" add bluez @@ -98,7 +98,7 @@ prompt_for_mac() { if echo "$choice" | grep -qE '^[0-9]+$' && [ -n "$choice" ] && [ "$choice" -le "$count" ] && [ "$choice" -gt 0 ]; then device=$(echo "$device_list" | sed -n "${choice}p") mac=$(echo "$device" | awk '{print $2}') - if bluetoothctl info "$mac" > /dev/null 2>&1; then + if bluetoothctl info "$mac" >/dev/null 2>&1; then if bluetoothctl "$command" "$mac"; then printf "%b\n" "${GREEN}$success_msg${RC}" break @@ -117,7 +117,6 @@ prompt_for_mac() { else printf "%b\n" "${RED}Invalid choice. Please try again.${RC}" read -r _ - fi done }