mepo: fix user_pin_updater on all locales v1 APPLIED

laalsaas: 1
 fix user_pin_updater on all locales

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/mepo-devel/patches/36460/mbox | git am -3
Learn more about email & git

[PATCH mepo] fix user_pin_updater on all locales Export this patch

The script mepo_ui_menu_user_pin_updater is using geoclue per default.
However, the where-am-i binary outputs the coordinates in a number
format which is locale-specific. i.e. if you've set
LC_NUMERIC="de_DE.UTF-8" , where-am-i will use the comma as the decimal
seperator instead of the point. This will lead to the following mepolang
statement produced by the script:

> pin_add 6 0 51,028178 13,710861 user_location;

Mepo can't deal with this and will silently ignore it. The fix is to set
the LC_NUMERIC variable to en_US for calling where-am-i.
 scripts/mepo_ui_menu_user_pin_updater.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mepo_ui_menu_user_pin_updater.sh b/scripts/mepo_ui_menu_user_pin_updater.sh
index a6b13ab..2cb56b3 100755
--- a/scripts/mepo_ui_menu_user_pin_updater.sh
+++ b/scripts/mepo_ui_menu_user_pin_updater.sh
@@ -28,7 +28,7 @@ coordsviageoclue() {

  /usr/libexec/geoclue-2.0/demos/agent > /dev/null &
  /usr/libexec/geoclue-2.0/demos/where-am-i -t $MEPO_TIMEOUT_GEOCLUE |
  LC_NUMERIC=en_US.UTF-8 /usr/libexec/geoclue-2.0/demos/where-am-i -t $MEPO_TIMEOUT_GEOCLUE |
    grep -E "Latitude|Longitude:" -m2 |
    cut -d: -f2 |
    tr -d "° " |