Skip to content

Commit e55a152

Browse files
committed
add env configurable executable LOC_JSON_PROVIDER
1 parent 591fbc5 commit e55a152

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

functions/get_loc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ function get_loc {
1515

1616
case "${LOC_PROVIDER}" in
1717
"termux")
18-
LOC_JSON=`termux-location -p gps`
18+
LOC_JSON_PROVIDER=${LOC_JSON_PROVIDER:-"termux-location -p gps"}
19+
LOC_JSON=$(LOC_JSON_PROVIDER)
1920
#
2021
LAT=`echo $LOC_JSON | jq -r '.latitude'`
2122
LON=`echo $LOC_JSON | jq -r '.longitude'`

0 commit comments

Comments
 (0)