From fb53a69dd0a8cd88efb31a1d0f1596ae6446858b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 16 Mar 2022 22:45:42 +0100 Subject: [PATCH] Update helpers/app Co-authored-by: Alexandre Aubin --- helpers/app | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/app b/helpers/app index 9d183cb2d..8745e2363 100644 --- a/helpers/app +++ b/helpers/app @@ -18,14 +18,14 @@ ynh_install_apps() { local apps_list=($(echo $apps | tr " " "\n")) # For each app - for i in "${apps_list[@]}" + for oneapp_and_its_args in "${apps_list[@]}" do # Retrieve the name of the app (part before _ynh) - local oneapp=$(echo "$i" | awk -F'_ynh' '{print $1}') + local oneapp=$(echo "$oneapp_and_its_args" | awk -F'?' '{print $1}') [ -z "$oneapp" ] && ynh_die --message="You didn't provided a YunoHost app to install" # Retrieve the arguments of the app (part after ?) - local oneargument=$(echo "$i" | awk -F'?' '{print $2}') + local oneargument=$(echo "$oneapp_and_its_args" | awk -F'?' '{print $2}') [ ! -z "$oneargument" ] && oneargument="--args \"$oneargument\"" if ! yunohost app list | grep -q "$oneapp"