Projet

Général

Profil

Révision 6c6343d9

Ajouté par Julien Enselme il y a environ 9 ans

Improve the detection of default with the path of a site.

Use a utilitary function to extract the exact site name from a site path.

Close #572

Voir les différences:

bin/scripts-utils.sh
115 115
    fi
116 116
    return 1
117 117
}
118

  
119
get_site_name_from_dir_name() {
120
    # ${1##*/} get the part after the last / ie default in /home/assos/drupal7/sites/default
121
    # $(tr '.' '\n' | tail -n 1) get the part after the last .
122
    # ie tvp in assos.centrale-marseille.fr.tvp
123
    echo $(echo ${1##*/} | tr '.' '\n' | tail -n 1)
124
}

Formats disponibles : Unified diff