kopia lustrzana https://github.com/mumble-voip/mumble-docker
refactor: declare most relevant variables at the start
Declare the most relevant variables at the start of the script, so the reader can be made aware of them more quickly.pull/6/head
rodzic
ec402cb89b
commit
35cb859dc4
|
@ -1,11 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DATA_DIR="/data"
|
||||
BARE_BONES_CONFIG_FILE="/etc/mumble/bare_config.ini"
|
||||
CONFIG_FILE="${DATA_DIR}/mumble_server_config.ini"
|
||||
readonly DATA_DIR="/data"
|
||||
readonly BARE_BONES_CONFIG_FILE="/etc/mumble/bare_config.ini"
|
||||
readonly CONFIG_FILE="${DATA_DIR}/mumble_server_config.ini"
|
||||
|
||||
server_invocation=( "${@}" )
|
||||
declare -a server_invocation=("${@}")
|
||||
declare -a existing_config_options
|
||||
declare -a used_configs
|
||||
|
||||
array_contains() {
|
||||
local array_expansion="$1[@]" seeking="$2"
|
||||
|
@ -44,9 +46,6 @@ if [[ -f "$MUMBLE_CUSTOM_CONFIG_FILE" ]]; then
|
|||
else
|
||||
echo -e "# Config file automatically generated from the MUMBLE_CONFIG_* environment variables\n" > "${CONFIG_FILE}"
|
||||
|
||||
used_configs=()
|
||||
existing_config_options=()
|
||||
|
||||
# Compile list of configurations that exist in bare bones config
|
||||
|
||||
while read -r line; do
|
||||
|
|
Ładowanie…
Reference in New Issue