Project

General

Profile

Revision 15ed27d8

Added by Julien Enselme over 9 years ago

Use getopts to print help and to parse script arguments.

View differences:

bin/d7-all-update-core.sh
1 1
#!/bin/sh
2 2

  
3
. /home/assos/bin/scripts-config.sh
3
usage() {
4
    printf "This script is intended to help you update drupal core. It follows steps described here: https://forge.centrale-marseille.fr/projects/clubdrupal/wiki/Utilisation_de_Drupal_multi-site#Mise-à-jour-du-noyau-de-Drupal
5
Please do not launch in cron.\n"
6
}
7
. /home/assos/bin/print-help-if-required.sh
8

  
4 9

  
5
help="This script is intended to help you update drupal core. It follows steps described here: https://forge.centrale-marseille.fr/projects/clubdrupal/wiki/Utilisation_de_Drupal_multi-site#Mise-%C3%A0-jour-du-noyau-de-Drupal
6
Please do not launch in cron."
10
. /home/assos/bin/scripts-config.sh
7 11

  
8 12
if ! tty -s ; then
9 13
    echo "${help}"
......
16 20
translations_backupdir=/var/tmp
17 21
cp "${translations_fr}" "${translations_backupdir}"
18 22

  
19
d7-all-dump-individual.sh manual
23
d7-all-dump-individual.sh -m manual
20 24

  
21 25
d7-all-drush.sh -y en update
22 26

  

Also available in: Unified diff