From f2c31cbe5d3e54772f87c1cb492f8e5ba7c8c27d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 6 Mar 2022 15:32:13 +0100 Subject: [PATCH] fix awk --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 987dc3b..0cac952 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -46,11 +46,11 @@ ynh_install_apps() { for i 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 "$i" | awk -F'_ynh' '{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 "$i" | awk -F'?' '{print $2}') [ ! -z "$oneargument" ] && oneargument="--args \"$oneargument\"" if ! yunohost app list | grep -q "$oneapp" @@ -88,7 +88,7 @@ ynh_remove_apps() { for i 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 "$i" | awk -F'_ynh' '{print $1}') [ -z "$oneapp" ] && ynh_die --message="You didn't provided a YunoHost app to remove" ynh_app_setting_delete --app=$app --key=require_$oneapp