mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Remove bashisms out of bluetooth-control (#462)
Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
69b61e7265
commit
093883e1bf
|
@ -68,8 +68,8 @@ scan_devices() {
|
||||||
printf "%b\n" "${GREEN}Devices found:${RC}"
|
printf "%b\n" "${GREEN}Devices found:${RC}"
|
||||||
echo "$devices"
|
echo "$devices"
|
||||||
fi
|
fi
|
||||||
echo "Press any key to return to the main menu..."
|
printf "Press any key to return to the main menu..."
|
||||||
read -n 1
|
read -r dummy
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to prompt for MAC address using numbers
|
# Function to prompt for MAC address using numbers
|
||||||
|
@ -85,8 +85,8 @@ prompt_for_mac() {
|
||||||
devices=$(bluetoothctl devices)
|
devices=$(bluetoothctl devices)
|
||||||
if [ -z "$devices" ]; then
|
if [ -z "$devices" ]; then
|
||||||
printf "%b\n" "${RED}No devices available. Please scan for devices first.${RC}"
|
printf "%b\n" "${RED}No devices available. Please scan for devices first.${RC}"
|
||||||
echo "Press any key to return to the main menu..."
|
printf "Press any key to return to the main menu..."
|
||||||
read -n 1
|
read -r dummy
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -121,8 +121,8 @@ prompt_for_mac() {
|
||||||
printf "%b\n" "${RED}Invalid choice. Please try again.${RC}"
|
printf "%b\n" "${RED}Invalid choice. Please try again.${RC}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Press any key to return to the main menu..."
|
printf "Press any key to return to the main menu..."
|
||||||
read -n 1
|
read -r dummy
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to pair with a device
|
# Function to pair with a device
|
||||||
|
|
Loading…
Reference in New Issue
Block a user