From 270449e2979cdb721957a21fc4eb31827984f814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Tue, 24 May 2016 22:20:37 +0200 Subject: [PATCH] [enh] Improve carddav app id grep in waiting a better helper --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 58bd152..c456eac 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -106,8 +106,8 @@ install_carddav() { # Look for installed and supported CardDAV servers for carddav_app in "owncloud" "baikal"; do - local app_id=$(sudo yunohost app list --installed --output-as plain \ - -f "$carddav_app" | ynh_get_plain_key '#id' | head -1) + local app_id=$(sudo yunohost app list --installed -f "$carddav_app" \ + --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) [[ -z "$app_id" ]] || { # Retrieve app settings and enable relevant preset carddav_domain=$(ynh_app_setting_get "$app_id" domain)