Révision 3e9236bd
Ajouté par Julien Enselme il y a plus de 9 ans
bin/d7-all-update-core.sh | ||
---|---|---|
6 | 6 |
Please do not launch in cron." |
7 | 7 |
|
8 | 8 |
if ! tty -s ; then |
9 |
echo $help
|
|
9 |
echo "${help}"
|
|
10 | 10 |
exit 1 |
11 | 11 |
fi |
12 | 12 |
|
... | ... | |
14 | 14 |
|
15 | 15 |
# Backup translations |
16 | 16 |
translations_backupdir=/var/tmp |
17 |
cp $translations_fr $translations_backupdir
|
|
17 |
cp "${translations_fr}" "${translations_backupdir}"
|
|
18 | 18 |
|
19 | 19 |
d7-all-dump-individual.sh manual |
20 | 20 |
|
21 | 21 |
d7-all-drush.sh -y en update |
22 | 22 |
|
23 |
cd $d7_dir
|
|
23 |
cd "${d7_dir}"
|
|
24 | 24 |
drush -y upc drupal |
25 | 25 |
|
26 | 26 |
d7-all-drush.sh -y updb |
... | ... | |
30 | 30 |
# Get the new subversion number: |
31 | 31 |
# cd to $d7_dir, filter drush status to get the drupal version line, |
32 | 32 |
# remove end line whitespaces, and get the 2 last caracters of the string. |
33 |
drupal_version=$(cd $d7_dir && drush status | grep "Drupal version" | tr -d ' ' | tail -c 3)
|
|
33 |
drupal_version="$(cd "${d7_dir}" && drush status | grep "Drupal version" | tr -d ' ' | tail -c 3)"
|
|
34 | 34 |
|
35 | 35 |
# Try to download new translation. If it fails, restore the old one. |
36 |
if ! curl -f http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.$drupal_version.fr.po -o $translations_fr ; then
|
|
37 |
cp $translations_backupdir/fr.po $translations_fr
|
|
36 |
if ! curl -f "http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.${drupal_version}.fr.po" -o "${translations_fr}" ; then
|
|
37 |
cp "${translations_backupdir}/fr.po" "${translations_fr}"
|
|
38 | 38 |
fi |
39 | 39 |
|
40 | 40 |
echo "Check for settings.php update." |
41 | 41 |
echo "If everything is fine, run:" |
42 |
echo -e "\tgit add -A drupal7 && git commit -m 'Udpate to 7.$drupal_version'" |
|
42 |
echo -e "\tgit add -A drupal7 && git commit -m 'Udpate to 7.${drupal_version}'" |
Formats disponibles : Unified diff
Update scritp so they respect the new convention.