From cff866da27e7503a24412a052f122465254ead21 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 17 Nov 2016 01:16:20 +0100 Subject: [PATCH] Correction du path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige le path si il est mal écrit. Pour passer le test de Package check. --- scripts/install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index d297a18..8fd9360 100755 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,14 @@ dbuser=$app # Source app helpers source /usr/share/yunohost/helpers +# Comments of this code was deleted, because it were in french... +if [ "${path:0:1}" != "/" ] && [ ${#path} -gt 0 ]; then + path="/$path" +fi +if [ "${path:${#path}-1}" == "/" ] && [ ${#path} -gt 1 ]; then + path="${path:0:${#path}-1}" +fi + # TODO: Check domain/path availability with app helper sudo yunohost app checkurl "${domain}${path}" -a "$app" \ || ynh_die "The path ${domain}${path} is not available for app installation."