From 525a3f50f3146e76bc702971e99876229d5671d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 5 Oct 2010 19:57:57 +0200 Subject: [PATCH] Fix export_sql script (fix autocomplete) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- bin/export_sql.bash | 63 +++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/bin/export_sql.bash b/bin/export_sql.bash index f80005f..2ecc94f 100755 --- a/bin/export_sql.bash +++ b/bin/export_sql.bash @@ -5,32 +5,33 @@ # Developers: list 'public' tables here. -SHARED_TABLES="account_types -forums -geoloc_administrativeareas -geoloc_countries -geoloc_localities -geoloc_subadministrativeareas -log_actions -newsletter_cat -profile_binet_enum -profile_corps_enum -profile_corps_rank_enum -profile_education_degree_enum -profile_education_enum -profile_education_field_enum -profile_job_entreprise_term -profile_job_enum -profile_job_term_enum -profile_job_term_relation -profile_langskill_enum -profile_medal_enum -profile_medal_grade_enum -profile_name_enum -profile_networking_enum -profile_section_enum -profile_skill_enum -reminder_type +SHARED_TABLES="account_types \ +forums \ +geoloc_administrativeareas \ +geoloc_countries \ +geoloc_localities \ +geoloc_subadministrativeareas \ +log_actions \ +newsletter_cat \ +profile_binet_enum \ +profile_corps_enum \ +profile_corps_rank_enum \ +profile_education_degree \ +profile_education_degree_enum \ +profile_education_enum \ +profile_education_field_enum \ +profile_job_entreprise_term \ +profile_job_enum \ +profile_job_term_enum \ +profile_job_term_relation \ +profile_langskill_enum \ +profile_medal_enum \ +profile_medal_grade_enum \ +profile_name_enum \ +profile_networking_enum \ +profile_section_enum \ +profile_skill_enum \ +reminder_type \ skins" usage() @@ -98,7 +99,7 @@ do esac done - +FILTER="sed -r s/AUTO_INCREMENT=[1-9]+/AUTO_INCREMENT=1/" DUMPER="mysqldump --add-drop-table --default-character-set=utf8 --force" if [ -n "$USER" ]; then @@ -131,15 +132,15 @@ dump () { if [ $DRY_RUN -eq 1 ]; then if [ -n "$FILE" ]; then - echo "$command >> $FILE" + echo "$command | $FILTER >> $FILE" else - echo $command + echo "$command | $FILTER" fi else if [ -n "$FILE" ]; then - $command >> $FILE + $command | $FILTER >> $FILE else - $command + $command | $FILTER fi fi } -- 2.1.4