Projet

Général

Profil

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

root / bin / usage.sh @ 6d91f38e

1 d52a5b2f jenselme
#!/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 = d6 ] ; then
13
    cd $d6_dir_sites
14
else
15
    cd $d7_dir_sites
16
fi
17
18
for dir in `find . -maxdepth 1 -mindepth 1 -type d ! -name all ! -name languages ! -name images | sort ` ; do
19 1fbc61c9 Florent Torregrosa
    # List projects that correspond to the status.
20 d52a5b2f jenselme
    # 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 e685b258 Florent Torregrosa
	if [ 1 -le `drush pml --status=$2 | grep $3 | wc -l` ] ; then
26 d52a5b2f jenselme
        echo $dir;
27
    fi
28
    cd -
29
done