Révision 3e00cc24
Ajouté par Julien Enselme il y a environ 10 ans
other-scripts/d7-sync.sh | ||
---|---|---|
11 | 11 |
You must launch this script at the root of the drupal instance. |
12 | 12 |
EOF |
13 | 13 |
|
14 |
### Init |
|
15 |
# Config |
|
16 |
source d7-sync-config.sh || source d7-sync-config.example.sh |
|
17 |
cd $DIR_MULTIASSOS |
|
18 |
ret=$? |
|
19 |
if [ $ret -ne 0 ] ; then |
|
20 |
echo "No config file. Exiting." |
|
21 |
exit 2 |
|
22 |
fi |
|
14 | 23 |
### sync drupal tree |
15 | 24 |
git pull --rebase |
16 | 25 |
|
... | ... | |
19 | 28 |
exit 0 |
20 | 29 |
fi |
21 | 30 |
|
22 |
root=$(pwd) |
|
23 |
cd drupal7/sites |
|
24 |
|
|
25 |
ret=$? |
|
26 |
if [ $ret -ne 0 ] ; then |
|
27 |
echo 'Not in the right directory. Exiting.' |
|
28 |
exit 1 |
|
29 |
fi |
|
31 |
cd $DIR_DRUPAL7_SITES |
|
30 | 32 |
|
31 | 33 |
if [ $1 = default ] ; then |
32 | 34 |
dir_site=$1 |
... | ... | |
60 | 62 |
ssh assos "rm $remote_sql_file" |
61 | 63 |
|
62 | 64 |
### modify settings.php |
63 |
python3 $root/other-scripts/modify-settings.py settings.local.php --baseurl assos.local/$1 |
|
65 |
if [ $1 = 'default' ] ; then |
|
66 |
base_url=$DOMAIN |
|
67 |
else |
|
68 |
base_url=$DOMAIN/$1 |
|
69 |
fi |
|
70 |
python3 $DIR_MULTIASSOS/other-scripts/modify-settings.py settings.local.php --baseurl $base_url |
|
64 | 71 |
|
65 | 72 |
### various drush cmd to finish synchronisation |
66 | 73 |
drush status > /dev/null |
Formats disponibles : Unified diff
Add possibility for a config file