ensure name was provided to bluetooth_battery script
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#! /bin/bash
|
||||
|
||||
name="$1"
|
||||
if [[ "$name" == "" ]]; then
|
||||
echo "No name was provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
model_line=$(upower -d | grep -n "$name" | cut -d ':' -f 1)
|
||||
if [[ "$model_line" == "" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user