diff --git a/_config.sh b/_config.sh index 4a5afdb..bb5d822 100644 --- a/_config.sh +++ b/_config.sh @@ -1,3 +1,2 @@ #!/bin/bash log_file=replication.log -databases=( 'database_one' 'another_database' ) diff --git a/start-replication.sh b/start-replication.sh index 3ae8280..bc173cb 100755 --- a/start-replication.sh +++ b/start-replication.sh @@ -6,6 +6,33 @@ set -a . "${CONFIG_FILE}" set +a +readopt='getopts $opts opt;rc=$?;[ $rc$opt == 0? ]&&exit 1;[ $rc == 0 ]||{ shift $[OPTIND-1];false; }' + +opts=vfdo: + +# Enumerating options +#while eval $readopt +#do +# echo OPT:$opt ${OPTARG+OPTARG:$OPTARG} +#done + +# Enumerating arguments +databases=( ) + +for arg +do + databases=( $databases $arg ) +done + +if [[ -z "$databases" ]]; then + cat <