mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-23 13:45:19 +00:00
Add bluez package to arch linux
This commit is contained in:
parent
1e1ea3c090
commit
c73fd51058
|
@ -8,7 +8,7 @@ setupBluetooth() {
|
||||||
if ! command_exists bluetoothctl; then
|
if ! command_exists bluetoothctl; then
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm bluez-utils
|
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm bluez bluez-utils
|
||||||
;;
|
;;
|
||||||
apk)
|
apk)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add bluez
|
"$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
|
if echo "$choice" | grep -qE '^[0-9]+$' && [ -n "$choice" ] && [ "$choice" -le "$count" ] && [ "$choice" -gt 0 ]; then
|
||||||
device=$(echo "$device_list" | sed -n "${choice}p")
|
device=$(echo "$device_list" | sed -n "${choice}p")
|
||||||
mac=$(echo "$device" | awk '{print $2}')
|
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
|
if bluetoothctl "$command" "$mac"; then
|
||||||
printf "%b\n" "${GREEN}$success_msg${RC}"
|
printf "%b\n" "${GREEN}$success_msg${RC}"
|
||||||
break
|
break
|
||||||
|
@ -117,7 +117,6 @@ prompt_for_mac() {
|
||||||
else
|
else
|
||||||
printf "%b\n" "${RED}Invalid choice. Please try again.${RC}"
|
printf "%b\n" "${RED}Invalid choice. Please try again.${RC}"
|
||||||
read -r _
|
read -r _
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user