Projet

Général

Profil

Paste
Télécharger (767 octets) Statistiques
| Branche: | Révision:

root / bin / usage.sh @ cf6a035a

1
#!/bin/sh
2

    
3
. /users/guest/assos/bin/scripts-config.sh
4
. scripts-utils.sh
5

    
6
help="# ARGS: Drupal_version, project_status, project_name\n
7
# List sites that have the project_name with the corresponding project_status.\n
8
# project status: enabled or disabled"
9

    
10
check_arguments $# 3 "$help"
11

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

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

    
24
    cd $dir;
25
	if [ 1 -le `drush pml --status=$2 | grep $3 | wc -l` ] ; then
26
        echo $dir;
27
    fi
28
    cd -
29
done