36 lines
664 B
Bash
Executable File
36 lines
664 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get config
|
|
. ~/.config/jebbatime.conf
|
|
|
|
cd $JEBBATIMEGITROOT
|
|
|
|
./tools/wasptool \
|
|
--battery \
|
|
--device $JEBBATIMEMAC
|
|
|
|
echo "Connecting Bluetooth"
|
|
sudo bluetoothctl connect $JEBBATIMEMAC
|
|
|
|
echo "Setting host `hostname` time via NTP"
|
|
sudo ntpdate $JEBBATIMENTPSERVER
|
|
|
|
echo "Checking time on watch"
|
|
./tools/wasptool \
|
|
--check-rtc \
|
|
--device $JEBBATIMEMAC
|
|
|
|
echo "Setting time on watch"
|
|
./tools/wasptool \
|
|
--rtc \
|
|
--device $JEBBATIMEMAC
|
|
|
|
echo "Checking time on watch"
|
|
./tools/wasptool \
|
|
--check-rtc \
|
|
--device $JEBBATIMEMAC
|
|
|
|
echo "Disconnecting Bluetooth"
|
|
sudo bluetoothctl disconnect $JEBBATIMEMAC
|
|
|