update aurora
This commit is contained in:
@@ -41,10 +41,10 @@ show_info() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [-n | -c | -i]"
|
echo "Usage: $0 [new | complete | info]"
|
||||||
echo " -n (new) : Export, import, and rename. (No privileges or post-scripts)"
|
echo " new : Export, import, and rename. (No privileges or post-scripts)"
|
||||||
echo " -c (complete) : Drop, export, import, grant privileges, and run post-scripts."
|
echo " complete : Drop, export, import, grant privileges, and run post-scripts."
|
||||||
echo " -i (info) : Show configuration information."
|
echo " info : Show configuration information."
|
||||||
}
|
}
|
||||||
|
|
||||||
export_schema() {
|
export_schema() {
|
||||||
@@ -96,15 +96,14 @@ if [ $# -eq 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts "nci" option; do
|
case "$1" in
|
||||||
case "$option" in
|
new)
|
||||||
n)
|
|
||||||
log "=== Starting 'new' operation ==="
|
log "=== Starting 'new' operation ==="
|
||||||
export_schema
|
export_schema
|
||||||
import_and_rename
|
import_and_rename
|
||||||
log "=== 'New' operation finished successfully ==="
|
log "=== 'New' operation finished successfully ==="
|
||||||
;;
|
;;
|
||||||
c)
|
complete)
|
||||||
log "=== Starting 'complete' operation ==="
|
log "=== Starting 'complete' operation ==="
|
||||||
drop_aurora_schema
|
drop_aurora_schema
|
||||||
export_schema
|
export_schema
|
||||||
@@ -113,13 +112,12 @@ while getopts "nci" option; do
|
|||||||
run_post_scripts
|
run_post_scripts
|
||||||
log "=== 'Complete' operation finished successfully ==="
|
log "=== 'Complete' operation finished successfully ==="
|
||||||
;;
|
;;
|
||||||
i)
|
info)
|
||||||
show_info
|
show_info
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Error: Invalid option."
|
echo "Error: Invalid argument '$1'."
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
|
||||||
|
|||||||
Reference in New Issue
Block a user