Rev 382 | Rev 489 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/bash
##############################################################################################################
# But : Script permettant d'initialiser en une seule commande l'ensemble de la base de données eFlore.
# Auteur : Jean-Pascal Milcent <jpm@tela-botanica.org> (translate bat file to shell script)
# License : GPL v3
# Création : 07 decembre 2011
# Version: 0.1
# 2011-12-07 - Création
# $Id$
##############################################################################################################
# Constante
APPDIR_ABSOLU=`pwd`;
#
CHEMIN_PHP="/opt/lampp/bin"
CHEMIN_TBF_CLI="$APPDIR_ABSOLU/scripts"
MEMORY_LIMIT="3500M"
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"
echo "Nettoyage et chargement en cours...";
echo "BASEFLOR :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a chargerStructureSql
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a chargerOntologies
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a chargerDonnees
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a genererChamps
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php baseflor -a chargerMetadonnees
echo "BIBLIO_BOTA :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php biblio_bota -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php biblio_bota -a chargerTous
echo "BDNT :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdnt -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdnt -a chargerTous
echo "BDTFX :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdtfx -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php bdtfx -a chargerTous
echo "CHORODEP :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php chorodep -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php chorodep -a chargerTous
echo "COSTE :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php coste -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php coste -a chargerTous
echo "EFLORE :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php eflore -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php eflore -a chargerTous
echo "INSEE-D :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php insee_d -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php insee_d -a chargerTous
echo "ISO-3166-1 :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_3166_1 -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_3166_1 -a chargerTous
echo "ISO-639-1 :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_639_1 -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php iso_639_1 -a chargerTous
echo "NVJFL :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nvjfl -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php nvjfl -a chargerTous
echo "PHOTOFLORA :";
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php photoflora -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php photoflora -a chargerTous
echo "CEL :";
echo -e "\033[31m`tput blink`ATTENTION :`tput sgr0` Nécessite la création préalable de la base de données \033[31mtb_cel\033[00m"
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php cel -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php cel -a chargerTous
echo "TAPIRLINK :";
echo -e "\033[31m`tput blink`ATTENTION :`tput sgr0` Nécessite la création préalable de la base de données \033[31mtb_hit_indexation\033[00m"
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php tapirlink -a supprimerTous
$CHEMIN_PHP/php -d memory_limit=$MEMORY_LIMIT $CHEMIN_TBF_CLI/cli.php tapirlink -a chargerTous