summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Borzì <borzifrancesco@gmail.com>2019-02-17 10:04:09 +0100
committerGitHub <noreply@github.com>2019-02-17 10:04:09 +0100
commit2bcedc2859e7a60c0120470e3c7f2dcd22e733d2 (patch)
tree79c747fd855056072d0312a5bb550b92cd369a28
parent9945f19a032dbd385e43ccc76ce80050ffcd5039 (diff)
fix(Bash/Exporter): fix path + add prompt to prevent wrong usage (#1477)
-rw-r--r--apps/db_exporter/db_export.sh9
-rwxr-xr-xbin/acore-db-export2
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/db_exporter/db_export.sh b/apps/db_exporter/db_export.sh
index c7dff778dc..4f98a83f20 100644
--- a/apps/db_exporter/db_export.sh
+++ b/apps/db_exporter/db_export.sh
@@ -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[@]}
diff --git a/bin/acore-db-export b/bin/acore-db-export
index 11b8d6cba0..e908f27c38 100755
--- a/bin/acore-db-export
+++ b/bin/acore-db-export
@@ -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"