From 94052768e234d53358d01af1fa79d6a5c557b39e Mon Sep 17 00:00:00 2001 From: Eliseu Egewarth Date: Thu, 21 Sep 2017 13:48:32 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20argumento=20senha=20aos=20scripts=20?= =?UTF-8?q?de=20migra=C3=A7=C3=A3o=20(#1496)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eliseu Egewarth --- sapl/legacy/scripts/migra_dbs.sh | 7 +++---- sapl/legacy/scripts/recria_dbs_postgres.sh | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sapl/legacy/scripts/migra_dbs.sh b/sapl/legacy/scripts/migra_dbs.sh index 0e52a9483..729e813cb 100755 --- a/sapl/legacy/scripts/migra_dbs.sh +++ b/sapl/legacy/scripts/migra_dbs.sh @@ -3,9 +3,8 @@ # rodar esse script na raiz do projeto if [ $# -eq 2 ]; then - parallel -eta --verbose ./sapl/legacy/scripts/migra_um_db.sh :::: <(mysql -u $1 -p$2 -e 'show databases;' | grep '^sapl_' | grep -v '_copy$') ::: $1 ::: $2 + parallel -eta --verbose -j+0 ./sapl/legacy/scripts/migra_um_db.sh :::: <(mysql -u $1 -p$2 -e 'show databases;' | grep '^sapl_' | grep -v '_copy$') ::: $1 ::: $2 else echo "USO:" - echo " ./sapl/legacy/scripts/migra_dbs.sh [usuário mysql] [senha mysql]" -fi; - + echo " $0 [usuário mysql] [senha mysql]" +fi; \ No newline at end of file diff --git a/sapl/legacy/scripts/recria_dbs_postgres.sh b/sapl/legacy/scripts/recria_dbs_postgres.sh index d84fa4c4d..450a306b4 100755 --- a/sapl/legacy/scripts/recria_dbs_postgres.sh +++ b/sapl/legacy/scripts/recria_dbs_postgres.sh @@ -1,11 +1,11 @@ +#!/bin/bash + # (Re)cria todos os bancos postgres para migração # cria um banco postgres (de mesmo nome) para cada banco mysql cujo nome começa com "sapl_" - if [ $# -eq 2 ]; then - parallel --verbose ./recria_um_db_postgres.sh :::: <(mysql -u $1 -p$2 -e 'show databases;' | grep '^sapl_' | grep -v '_copy$') + parallel --verbose -j+0 ./recria_um_db_postgres.sh :::: <(mysql -u $1 -p$2 -e 'show databases;' | grep '^sapl_' | grep -v '_copy$') else echo "USO:" - echo " ./recria_dbs_postgres.sh [usuário mysql] [senha mysql]" -fi; - + echo " $0 [usuário mysql] [senha mysql]" +fi; \ No newline at end of file