File tree Expand file tree Collapse file tree 1 file changed +9
-23
lines changed Expand file tree Collapse file tree 1 file changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -272,23 +272,6 @@ install_examples()
272
272
( cd " $EXAMPLEPROBDIR " && yes y | " $BINDIR " /import-contest )
273
273
}
274
274
275
- uninstall_helper ()
276
- {
277
- read_dbpasswords
278
- remove_db_users
279
- }
280
-
281
- create_db_users_helper ()
282
- {
283
- read_dbpasswords
284
- create_db_users
285
- verbose " Created empty database and users."
286
- }
287
-
288
- create_database_dump () {
289
- mysqldump $( mysql_options) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DATABASEDUMPDIR /${1} .sql.gz"
290
- }
291
-
292
275
# ## Script starts here ###
293
276
294
277
# Parse command-line options:
@@ -345,7 +328,8 @@ genpass)
345
328
;;
346
329
347
330
uninstall)
348
- uninstall_helper
331
+ read_dbpasswords
332
+ remove_db_users
349
333
;;
350
334
351
335
install-examples)
@@ -364,7 +348,8 @@ install-loadtest)
364
348
;;
365
349
366
350
create-db-users)
367
- create_db_users_helper
351
+ read_dbpasswords
352
+ create_db_users
368
353
;;
369
354
370
355
update-password)
@@ -413,7 +398,8 @@ dump)
413
398
exit 1
414
399
fi
415
400
416
- if [ -f " ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz" ]; then
401
+ DUMPFILE=" ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz"
402
+ if [ -f " $DUMPFILE " ]; then
417
403
while true ; do
418
404
printf " Overwrite existing database dump (y/N)? "
419
405
read -r yn
@@ -423,7 +409,7 @@ dump)
423
409
esac
424
410
done
425
411
fi
426
- create_database_dump " $DUMPNAME "
412
+ mysqldump $( mysql_options ) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DUMPFILE "
427
413
;;
428
414
429
415
load)
@@ -465,8 +451,8 @@ load)
465
451
fi
466
452
467
453
read_dbpasswords
468
- uninstall_helper
469
- create_db_users_helper
454
+ remove_db_users
455
+ create_db_users
470
456
pv " ${FILE} " | gunzip | mysql " $DBNAME "
471
457
;;
472
458
You can’t perform that action at this time.
0 commit comments