Add .editorconfig and correct indentation for many seqs

This commit is contained in:
2022-03-14 21:27:29 +01:00
parent bb8b54597a
commit 71612aef94
34 changed files with 178 additions and 164 deletions

View File

@@ -78,7 +78,7 @@ step_2_info() { echo "Create postgres database for $toolName"; }
step_2_alias() { ALIAS="createdb"; }
step_2() {
readDatabaseInfos
exe cd ~postgres
exe su -c "psql -c \"CREATE USER ${postgresUser} WITH ENCRYPTED password '${postgresPass}';\"" - postgres
exe su -c "psql -c \"CREATE DATABASE ${postgresDb} ENCODING \"UTF8\" LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER ${postgresUser};\"" - postgres
@@ -154,12 +154,13 @@ SyslogIdentifier=synapse
[Install]
WantedBy=multi-user.target"
step_10_info() { echo -n "Upgrade $toolName installation"
if [ $CONTEXT_HELP -eq 0 ] ; then
echo " at $MATRIX_HOME"
else
echo
fi
step_10_info() {
echo -n "Upgrade $toolName installation"
if [ $CONTEXT_HELP -eq 0 ] ; then
echo " at $MATRIX_HOME"
else
echo
fi
}
step_10_alias() { ALIAS="upgrade"; }
step_10() {
@@ -193,7 +194,7 @@ step_14() {
local synapseIP=localhost
shift
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/server_version"
@@ -215,7 +216,7 @@ step_16() {
shift
local synapseIP=localhost
local grepOut=" | grep -E '(\"total\":|\"name\":)'"
for arg in "$@" ; do
case "$1" in
-r)
@@ -229,9 +230,9 @@ step_16() {
done
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v2/users"
exep "curl -sS --header \"Authorization: Bearer $MATRIX_ACCESS\" \"$apiCall\" | python -m json.tool $grepOut"
}
@@ -285,7 +286,7 @@ step_22() {
local arg
local synapseIP=localhost
local grepOut=" | grep -E '(\"total\":|\"name\":|\"room_id\":)'"
for arg in "$@" ; do
case "$1" in
-r)
@@ -299,9 +300,9 @@ step_22() {
done
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
exep "curl -sS --header \"Authorization: Bearer $MATRIX_ACCESS\" \"$apiCall\" | python -m json.tool $grepOut"
}
@@ -321,7 +322,7 @@ step_24() {
local roomId=""
local synapseIP=localhost
local grepOut=" | grep -E '(\"total\":|\"members\":|\"@)'"
for arg in "$@" ; do
case "$1" in
-r)
@@ -340,9 +341,9 @@ step_24() {
fi
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms/$roomId/members"
exep "curl -sS --header \"Authorization: Bearer $MATRIX_ACCESS\" \"$apiCall\" | python -m json.tool $grepOut"
}
@@ -361,14 +362,14 @@ step_26() {
local i
local arg
local synapseIP=localhost
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
local arrRoom=( $(curl -sS --header "Authorization: Bearer $MATRIX_ACCESS" "$apiCall" | jq '.rooms[] | select(.joined_local_members == 0) | .room_id') )
for i in "${!arrRoom[@]}" ; do
arrRoom[$i]="${arrRoom[$i]:1:${#arrRoom[$i]}-2}"
done
@@ -391,7 +392,7 @@ step_28() {
shift
local roomId=""
local synapseIP=localhost
if [ ! -z $1 ]; then
roomId="$1"
shift
@@ -434,12 +435,12 @@ step_30() {
shift
local pgVerboseReId=" (VERBOSE) "
local pgVerboseVac=" VERBOSE"
if [ $VERBOSE == 0 ]; then
pgVerboseReId=" "
pgVerboseVac=""
fi
if [ -z $1 ]; then
readDatabaseInfos
else