Projet

Général

Profil

Révision 3e9236bd

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

Update scritp so they respect the new convention.

  • Variables are quoted.
  • $(…) are quoted.

Voir les différences:

bin/usage.sh
7 7
# List sites that have the project_name with the corresponding project_status.\n
8 8
# project status: enabled or disabled"
9 9

  
10
check_arguments $# 3 "$help"
10
check_arguments "$#" 3 "${help}"
11 11

  
12
if [ $1 = d7 ] ; then
13
    cd $d7_dir_sites
12
if [ "$1" = d7 ] ; then
13
    cd "${d7_dir_sites}"
14 14
else
15 15
    echo Unrecognize version.
16 16
fi
17 17

  
18 18
number_found=0
19 19

  
20
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all ! -name languages ! -name images | sort) ; do
20
for dir in "$(find . -maxdepth 1 -mindepth 1 -type d ! -name all ! -name languages ! -name images | sort)" ; do
21 21
    # List projects that correspond to the status.
22 22
    # Keep project_name if listed.
23 23
    # Count line result. 0 if not listed or 1 if listed.
24 24
    # Print site_dir if listed.
25 25

  
26
    cd $dir;
27
	if [ 1 -le $(drush pml --status=$2 | grep $3 | wc -l) ] ; then
28
        echo $dir;
26
    cd "${dir}";
27
	if [ 1 -le "$(drush pml --status="$2" | grep "$3" | wc -l)" ] ; then
28
        echo "${dir}";
29 29
        number_found=$(($number_found + 1))
30 30
    fi
31 31
    cd -

Formats disponibles : Unified diff