From 754a5ff3904dc81f6806c9e558be70b593359a67 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Fri, 15 Aug 2014 12:05:24 +0200 Subject: [PATCH] [fix] wrong detection of baikal and radicale installation --- scripts/install | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 2e1dc57..d088b6b 100644 --- a/scripts/install +++ b/scripts/install @@ -13,11 +13,15 @@ fi baikal=0 radicale=0 -if [[ $(sudo yunohost app list --json | grep -q '"id": "baikal"') -eq 0 ]]; then + +sudo yunohost app list -f baikal --json | grep '"installed": true' && baikal=1 +sudo yunohost app list -f radicale --json | grep '"installed": true' && radicale=1 + +if [ "$baikal" == "1" ] ; then echo "Detected Baikal" baikal=1 caldavapp=baikal -elif [[ $(sudo yunohost app list --json | grep -q '"id": "radicale"')? -eq 0 ]]; then +elif [ "$radicale" == "1" ] ; then echo "Detected Radicale" radicale=1 caldavapp=radicale