From 636632b1d03f14c45911c1051d39ff01bd6f118a Mon Sep 17 00:00:00 2001 From: spv Date: Tue, 29 Jul 2025 18:35:09 -0400 Subject: wait for gps fix, use file extensions, make the logging all professional-like --- src/wait_for_fix.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 src/wait_for_fix.sh (limited to 'src/wait_for_fix.sh') diff --git a/src/wait_for_fix.sh b/src/wait_for_fix.sh new file mode 100755 index 0000000..ab83968 --- /dev/null +++ b/src/wait_for_fix.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env zsh + +function got_fix { + mmcli -m any --location-get | + grep -q GPS && + echo 'true' +} + +while [ "`got_fix`" != 'true' ]; do + echo "[i] waiting for fix..." + sleep 1 +done + +echo "[*] got it." \ No newline at end of file -- cgit v1.2.3