mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
fix: early abort if local coords are missing
This commit is contained in:
1 parent
d6223e54b0
commit
6aa1ec4201
1 file changed
+4
@@ -369,6 +369,10 @@ local_latlon(){
|
|||||||
get_dist(){
|
get_dist(){
|
||||||
shift
|
shift
|
||||||
local given_ip="$1"
|
local given_ip="$1"
|
||||||
|
if [[ ! -f $_cache_coords ]]; then
|
||||||
|
printf "Unknown"
|
||||||
|
return
|
||||||
|
fi
|
||||||
readarray -t coords < "$_cache_coords"
|
readarray -t coords < "$_cache_coords"
|
||||||
readarray -t n < <(<<< "$given_ip" awk 'BEGIN{RS="."}{$1=$1}1')
|
readarray -t n < <(<<< "$given_ip" awk 'BEGIN{RS="."}{$1=$1}1')
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user