Projet

Général

Profil

Révision ad4e6a76

Ajouté par Julien Enselme il y a plus de 7 ans

Correct sites_list after drush update

Voir les différences:

bin/scripts-utils.sh
128 128
}
129 129

  
130 130
sites_list() {
131
    # The commands output assos.centrale-marseille.fr/<site-name> or assos.centrale-marseille.fr (default).
132
    # Since we want only the site name (and default for default), we replace assos.centrale-marseille.fr by
133
    # assos.centrale-marseille.fr/default so it si like other site. We then use awk to split the strip on /
134
    # and get only the site name.
131 135
    # grep -v "^self$" is used to remove self that appear if command is launched in one of drupal directories
132
    drush sa --format=csv --fields="name","uri" | awk '{FS=","; if ($2 != "") { print $1;}}' | sort | grep -v "^self$"
136
    drush sa --format=csv --fields="name","uri" |
137
        sed 's#^assos.centrale-marseille.fr$#asoss.centrale-marseille.fr/default#' |
138
        awk '{if ($1 != "") { split($1, a, "/"); print a[2];}}' |
139
        sort |
140
        grep -v "^self$"
133 141
}

Formats disponibles : Unified diff