Skip to content

Commit 7a9b5c6

Browse files
committed
Remove setting a variable as a step
1 parent 06d8626 commit 7a9b5c6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

bin/create-backup-databases.sh

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/bin/bash
22

3-
printf "This script will download sensitive material to this machine.\n" 1>&2
3+
printf "This script will transmit sensitive material to and from this machine.\n" 1>&2
44
read -p "Is this ok [y/N]: " PROMPT
55
if [ "${PROMPT}" != "Y" ] && [ "${PROMPT}" != "y" ]; then
66
printf "Operation aborted.\n" 1>&2
77
exit 1
88
fi
99

10+
SRCDIR="$(git rev-parse --show-toplevel)"
11+
1012
MYSQLHOST="$1"
1113
if [ -z "${MYSQLHOST}" ]; then
1214
read -p "Enter the MySQL server hostname: " MYSQLHOST
@@ -36,14 +38,11 @@ fi
3638

3739
set -e
3840

39-
printf "[1/4] Getting path of current project...\n"
40-
SRCDIR="$(git rev-parse --show-toplevel)"
41-
42-
printf "[2/4] Creating new backup directory...\n"
41+
printf "[1/3] Creating new backup directory...\n"
4342
BKUPDIR="${SRCDIR}/tmp/sql-backups/$(date +%Y%m%d-%H%M)"
4443
mkdir -v -p "${BKUPDIR}"
4544

46-
printf "[3/4] Dumping BNETDocs Redux database...\n"
45+
printf "[2/3] Dumping BNETDocs Redux database...\n"
4746
mysqldump --host="${MYSQLHOST}" --user="${MYSQLUSER}" \
4847
--password="${MYSQLPASS}" \
4948
--opt --order-by-primary \
@@ -52,7 +51,7 @@ mysqldump --host="${MYSQLHOST}" --user="${MYSQLUSER}" \
5251
--result-file "${BKUPDIR}/database.redux.sql" \
5352
--databases bnetdocs_botdev
5453

55-
printf "[4/4] Dumping BNETDocs Phoenix database...\n"
54+
printf "[3/3] Dumping BNETDocs Phoenix database...\n"
5655
mysqldump --host="${MYSQLHOST}" --user="${MYSQLUSER}" \
5756
--password="${MYSQLPASS}" \
5857
--opt --order-by-primary \

0 commit comments

Comments
 (0)