From 38f61c775b94e22d5716542c2d7c2b2880ac2d04 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Nov 2021 22:07:24 +0100 Subject: [PATCH] ynh_setting_get: epic regex is unreadable and breaks syntax highlighting, let's copypasta the official helper... --- conf/ynh-hotspot | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/conf/ynh-hotspot b/conf/ynh-hotspot index 8c08e17..3f68bef 100644 --- a/conf/ynh-hotspot +++ b/conf/ynh-hotspot @@ -253,11 +253,19 @@ stop_hostapd() { ## Tools ynh_setting_get() { - app=${1} - setting=${2} - grep "^${setting}:" "/etc/yunohost/apps/${app}/settings.yml" | sed s/^[^:]\\+:\\s*[\"\']\\?// | sed s/\\s*[\"\']\$// - # '" + APP="$1" KEY="$2" python3 - <