Skip to content

Commit 0b1325f

Browse files
committed
Fix some shellcheck issues
1 parent 6502dc7 commit 0b1325f

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

scripts/reset_ble_stack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
set -e
33

44
systemctl --user stop ble-peripheral
5-
bluetoothctl power off &> /dev/null
5+
bluetoothctl power off > /dev/null 2>&1
66
echo "Restarting bluez"
77
# Configure sudo to allow running this without asking for a password
8-
sudo $(realpath scripts/reset_bluez.sh)
8+
sudo "$(realpath scripts/reset_bluez.sh)"
99
sleep 2
1010
echo "Powering on controller"
11-
bluetoothctl power on &> /dev/null
11+
bluetoothctl power on > /dev/null 2>&1
1212
sleep 2
1313
echo "Starting BLE service"
1414
systemctl --user start ble-peripheral

scripts/reset_manually.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

33
notify-send -t 3600000 -a ProtocolStateFuzzer -h string:x-canonical-private-synchronous:my-notification ProtocolStateFuzzer 'Device reset needed'
4-
read -p 'PLEASE RESET THE DEVICE AND THEN PRESS ENTER TO CONTINUE...'
4+
read -p -r 'PLEASE RESET THE DEVICE AND THEN PRESS ENTER TO CONTINUE...'
55
notify-send -t 1 -a ProtocolStateFuzzer -h string:x-canonical-private-synchronous:my-notification ProtocolStateFuzzer 'Continuing'
66

scripts/setup_venv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ else
1414
pip3 install -r requirements.txt
1515
# Install the BLESMPServer
1616
git clone https://github.com/apferscher/ble-learning.git
17-
cd ble-learning
17+
cd ble-learning || exit
1818
git checkout febd774109c41a6635659b8847cc766e667841dd
19-
cd libs/smp_server
19+
cd libs/smp_server || exit
2020
python3 setup.py install
2121
cd ../../..
2222
rm -rf ble-learning

0 commit comments

Comments
 (0)