From 29929f37e0980bf6203080a5805296b08e5067a2 Mon Sep 17 00:00:00 2001 From: frju365 Date: Mon, 17 Apr 2017 14:52:50 +0200 Subject: [PATCH] Update .fonctions --- scripts/.fonctions | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/scripts/.fonctions b/scripts/.fonctions index 45081f1..dd5e3ee 100644 --- a/scripts/.fonctions +++ b/scripts/.fonctions @@ -221,29 +221,6 @@ ynh_no_log() { return $? } -# Normalize the url path syntax -# Handle the slash at the beginning of path and its absence at ending -# Return a normalized url path -# -# example: url_path=$(ynh_normalize_url_path $url_path) -# ynh_normalize_url_path example -> /example -# ynh_normalize_url_path /example -> /example -# ynh_normalize_url_path /example/ -> /example -# -# usage: ynh_normalize_url_path path_to_normalize -# | arg: url_path_to_normalize - URL path to normalize before using it -ynh_normalize_url_path () { - path=$1 - test -n "$path" || ynh_die "ynh_normalize_url_path expect a URL path as first argument and received nothing." - if [ "${path:0:1}" != "/" ]; then # If the first character is not a / - path="/$path" # Add / at begin of path variable - fi - if [ "${path:${#path}-1}" == "/" ] && [ ${#path} -gt 1 ]; then # If the last character is a / and that not the only character. - path="${path:0:${#path}-1}" # Delete the last character - fi - echo $path -} - # Create a database, an user and its password. Then store the password in the app's config # # User of database will be store in db_user's variable.