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 @@ -240,23 +240,6 @@ install_examples()
240
240
( cd " $EXAMPLEPROBDIR " && yes y | " $BINDIR " /import-contest )
241
241
}
242
242
243
- uninstall_helper ()
244
- {
245
- read_dbpasswords
246
- remove_db_users
247
- }
248
-
249
- create_db_users_helper ()
250
- {
251
- read_dbpasswords
252
- create_db_users
253
- verbose " Created empty database and users."
254
- }
255
-
256
- create_database_dump () {
257
- mysqldump $( mysql_options) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DATABASEDUMPDIR /${1} .sql.gz"
258
- }
259
-
260
243
# ## Script starts here ###
261
244
262
245
# Parse command-line options:
@@ -313,7 +296,8 @@ genpass)
313
296
;;
314
297
315
298
uninstall)
316
- uninstall_helper
299
+ read_dbpasswords
300
+ remove_db_users
317
301
;;
318
302
319
303
install-examples)
@@ -332,7 +316,8 @@ install-loadtest)
332
316
;;
333
317
334
318
create-db-users)
335
- create_db_users_helper
319
+ read_dbpasswords
320
+ create_db_users
336
321
;;
337
322
338
323
bare-install|install)
@@ -377,7 +362,8 @@ dump)
377
362
exit 1
378
363
fi
379
364
380
- if [ -f " ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz" ]; then
365
+ DUMPFILE=" ${DATABASEDUMPDIR} /${DUMPNAME} .sql.gz"
366
+ if [ -f " $DUMPFILE " ]; then
381
367
while true ; do
382
368
printf " Overwrite existing database dump (y/N)? "
383
369
read -r yn
@@ -387,7 +373,7 @@ dump)
387
373
esac
388
374
done
389
375
fi
390
- create_database_dump " $DUMPNAME "
376
+ mysqldump $( mysql_options ) --opt --skip-lock-tables " $DBNAME " | pv | gzip > " $DUMPFILE "
391
377
;;
392
378
393
379
load)
@@ -429,8 +415,8 @@ load)
429
415
fi
430
416
431
417
read_dbpasswords
432
- uninstall_helper
433
- create_db_users_helper
418
+ remove_db_users
419
+ create_db_users
434
420
pv " ${FILE} " | gunzip | mysql " $DBNAME "
435
421
;;
436
422
You can’t perform that action at this time.
0 commit comments