summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Siraut <csiraut@entrouvert.com>2019-06-05 10:00:21 (GMT)
committerChristophe Siraut <csiraut@entrouvert.com>2019-06-05 10:00:21 (GMT)
commit0b326727daf23d363f94918105dbef16c32d01b9 (patch)
tree364beddb1aa95f2cb4ec3c61ccfc26a0f22cf971
parent6fd3afc1f0fce2d706441048f25150121919f96b (diff)
downloadpublik-client-scripts-0b326727daf23d363f94918105dbef16c32d01b9.zip
publik-client-scripts-0b326727daf23d363f94918105dbef16c32d01b9.tar.gz
publik-client-scripts-0b326727daf23d363f94918105dbef16c32d01b9.tar.bz2
montpellier: remove extraneous semicolonv1.3
-rwxr-xr-xclients/montpellier/pg_copy_bijoe_schema16
1 files changed, 8 insertions, 8 deletions
diff --git a/clients/montpellier/pg_copy_bijoe_schema b/clients/montpellier/pg_copy_bijoe_schema
index 5c04c7a..142a4ed 100755
--- a/clients/montpellier/pg_copy_bijoe_schema
+++ b/clients/montpellier/pg_copy_bijoe_schema
@@ -15,14 +15,14 @@ schema=$1
destination=montpellier3m_bijoe
owner=montpellier3m
-psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='$owner'" | grep -q 1 || psql -c "CREATE ROLE $owner;"
+psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='$owner'" | grep -q 1 || psql -c "CREATE ROLE $owner"
-psql -c "select pg_terminate_backend(pid) from pg_stat_activity where datname = '$destination';" >/dev/null
-psql -c "DROP DATABASE IF EXISTS $destination;" >/dev/null
-psql -c "CREATE DATABASE $destination WITH OWNER '$owner';" >/dev/null
+psql -c "select pg_terminate_backend(pid) from pg_stat_activity where datname = '$destination'" >/dev/null
+psql -c "DROP DATABASE IF EXISTS $destination" >/dev/null
+psql -c "CREATE DATABASE $destination WITH OWNER '$owner'" >/dev/null
pg_dump --no-owner --schema $schema $origin | psql $destination >/dev/null
-psql -c "ALTER ROLE $owner WITH LOGIN;" >/dev/null
-psql -c "GRANT CONNECT ON DATABASE $destination TO $owner;" >/dev/null
-psql $destination -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO $owner;" >/dev/null
-psql $destination -c "GRANT SELECT ON ALL TABLES IN SCHEMA $schema TO $owner;" >/dev/null
+psql -c "ALTER ROLE $owner WITH LOGIN" >/dev/null
+psql -c "GRANT CONNECT ON DATABASE $destination TO $owner" >/dev/null
+psql $destination -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO $owner" >/dev/null
+psql $destination -c "GRANT SELECT ON ALL TABLES IN SCHEMA $schema TO $owner" >/dev/null