fix(Bash/Exporter): fix path + add prompt to prevent wrong usage (#1477)

This commit is contained in:
Francesco Borzì 2019-02-17 10:04:09 +01:00 committed by GitHub
parent 9945f19a03
commit 2bcedc2859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -8,6 +8,13 @@ if [ -f "./config.sh" ]; then
source "./config.sh" # should overwrite previous
fi
echo "This is a dev-only procedure to export the DB into the SQL base files. All base files will be overwritten."
read -p "Are you sure you want to continue (y/N)? " choice
case "$choice" in
y|Y ) echo "Exporting the DB into the SQL base files...";;
* ) return;;
esac
echo "===== STARTING PROCESS ====="
@ -34,7 +41,7 @@ function export() {
base_name=${!var_base_name}
bash $AC_PATH_MODULES"/drassil/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
bash $AC_PATH_DEPS"/drassil/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
}
for db in ${DATABASES[@]}

View File

@ -2,4 +2,4 @@
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_exporter/db_exporter.sh"
source "$CUR_PATH/../apps/db_exporter/db_export.sh"