359 |
jpm |
1 |
#!/bin/bash
|
|
|
2 |
##############################################################################################################
|
|
|
3 |
# But : Script permettant d'initialiser en une seule commande l'ensemble de la base de données eFlore.
|
|
|
4 |
# Auteur : Jean-Pascal Milcent <jpm@tela-botanica.org> (translate bat file to shell script)
|
|
|
5 |
# Encodage : ISO-8859-15
|
|
|
6 |
# License : GPL v3
|
|
|
7 |
# Création : 07 decembre 2011
|
|
|
8 |
# Version: 0.1
|
|
|
9 |
# 2012-03-21 : Création de la version serveur en ISO-8859-15, modification des chemins, suppression des scripts inutiles.
|
|
|
10 |
# 2011-12-07 : Création de la version originale en UTF-8
|
|
|
11 |
# $Id$
|
|
|
12 |
##############################################################################################################
|
|
|
13 |
# Constante
|
|
|
14 |
APPDIR_ABSOLU=`pwd`;
|
|
|
15 |
#
|
407 |
jpm |
16 |
CHEMIN_PHP="sudo -u telabotap /usr/local/bin"
|
359 |
jpm |
17 |
CHEMIN_TBF_CLI="$APPDIR_ABSOLU"
|
|
|
18 |
MEMORY_LIMIT="4000M
|
|
|
19 |
echo -e "\033[31m`tput blink`ATTENTION :`tput sgr0` Nécessite la création préalable de la base de données \033[31mtb_eflore\033[00m"
|
|
|
20 |
echo "Nettoyage et chargement en cours...";
|
434 |
jpm |
21 |
echo "BASEFLOR :";
|
|
|
22 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a supprimerTous
|
|
|
23 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a chargerTous
|
359 |
jpm |
24 |
echo "BDNT :";
|
|
|
25 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdnt -a supprimerTous
|
|
|
26 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdnt -a chargerTous
|
|
|
27 |
echo "BDTFX :";
|
|
|
28 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdtfx -a supprimerTous
|
|
|
29 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdtfx -a chargerTous
|
|
|
30 |
echo "CHORODEP :";
|
|
|
31 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php chorodep -a supprimerTous
|
|
|
32 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php chorodep -a chargerTous
|
|
|
33 |
echo "EFLORE :";
|
|
|
34 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php eflore -a supprimerTous
|
|
|
35 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php eflore -a chargerTous
|
|
|
36 |
echo "INSEE-D :";
|
|
|
37 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php insee_d -a supprimerTous
|
|
|
38 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php insee_d -a chargerTous
|
|
|
39 |
echo "ISO-3166-1 :";
|
|
|
40 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_3166_1 -a supprimerTous
|
|
|
41 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_3166_1 -a chargerTous
|
|
|
42 |
echo "ISO-639-1 :";
|
|
|
43 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_639_1 -a supprimerTous
|
|
|
44 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_639_1 -a chargerTous
|
|
|
45 |
echo "NVJFL :";
|
|
|
46 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nvjfl -a supprimerTous
|
|
|
47 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nvjfl -a chargerTous
|
711 |
delphine |
48 |
echo "NVA :";
|
|
|
49 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nva -a supprimerTous
|
|
|
50 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nva -a chargerTous
|
359 |
jpm |
51 |
echo "PHOTOFLORA :";
|
|
|
52 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php photoflora -a supprimerTous
|
|
|
53 |
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php photoflora -a chargerTous
|