Projet

Général

Profil

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

root / other-scripts / one-use / d7-all-gen-aliases.sh @ 3040d30c

1
#!/bin/bash
2

    
3
# This scripts generates site aliases for our install.
4

    
5
aliases_drushrc_php='aliases.drushrc.php'
6

    
7
echo '<?php' > $aliases_drushrc_php
8

    
9
# Generate @d7
10
echo "\$aliases['d7'] = array(
11
    'site-list' => array(" >> $aliases_drushrc_php
12
for dir in `find ../htmltest/sites/ -maxdepth 1 -type d ! -name all | sort` ; do
13
    site_name=`echo $dir | tr '.' '\n' | tail -n 1`
14
    echo "        'assos.centrale-marseille.fr/$site_name'," >> $aliases_drushrc_php
15
done
16
echo '    ),' >> $aliases_drushrc_php
17
echo "    'root' => '/users/guest/assos/htmltest/'," >> $aliases_drushrc_php
18
echo ');' >> $aliases_drushrc_php
19

    
20
# Generate aliases for each site
21
for dir in `find ../htmltest/sites/ -maxdepth 1 -type d ! -name all | sort` ; do
22
    site_name=`echo $dir | tr '.' '\n' | tail -n 1`
23
    echo "\$aliases['$site_name'] = array('uri' => 'assos.centrale-marseille.fr/$site_name', 'root' => '/users/guest/assos/htmltest/', );" >> $aliases_drushrc_php
24
done