Révision 0ddd66a7
Ajouté par Julien Enselme il y a environ 10 ans
other-scripts/d7-sync.sh | ||
---|---|---|
1 |
#!/usr/bin/bash |
|
1 |
#!/usr/bin/env bash
|
|
2 | 2 |
|
3 | 3 |
help=<<EOF |
4 | 4 |
This script is intended to ease the synchronisation of any site hosted by assos. It relies on bash, drush and requires @ssh assos@ to work. |
... | ... | |
20 | 20 |
echo "No config file. Exiting." |
21 | 21 |
exit 2 |
22 | 22 |
fi |
23 |
# git |
|
24 |
git checkout master |
|
25 |
git branch $LOCAL_BRANCH_NAME |
|
26 |
|
|
23 | 27 |
### sync drupal tree |
24 | 28 |
git pull --rebase |
29 |
git checkout $LOCAL_BRANCH_NAME |
|
30 |
git rebase master |
|
25 | 31 |
|
26 | 32 |
### sync files |
27 | 33 |
if [ -z "$1" ] ; then |
... | ... | |
69 | 75 |
fi |
70 | 76 |
python3 $DIR_MULTIASSOS/other-scripts/modify-settings.py settings.local.php --baseurl $base_url |
71 | 77 |
|
78 |
### Modify sites.php |
|
79 |
sed "s/\['assos.centrale-marseille.fr[a-b1-9]*/['$DOMAIN/g" < $SITES_PHP > $SITES_PHP.tmp |
|
80 |
mv $SITES_PHP.tmp $SITES_PHP |
|
81 |
git commit -a -m "Modify sites.php" |
|
82 |
|
|
72 | 83 |
### various drush cmd to finish synchronisation |
73 | 84 |
drush status > /dev/null |
74 | 85 |
ret=$? |
Formats disponibles : Unified diff
Manage sites.php