Skip to content

Commit

Permalink
Implement shellcheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
echlebek committed Jun 4, 2024
1 parent 92d3bf4 commit d5bbfeb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions install-script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ function get_user_config() {
return
fi

read_yaml_config_key $file "extensions sumologic installation_token" # || read_yaml_config_key $file "extensions sumologic install_token"
read_yaml_config_key "${file}" "extensions sumologic installation_token" # || read_yaml_config_key $file "extensions sumologic install_token"
}

# remove quotes and double quotes from yaml `value`` for `key: value` form
Expand Down Expand Up @@ -1218,7 +1218,7 @@ function get_user_api_url() {
return
fi

read_yaml_config_key $file "extensions sumologic api_base_url"
read_yaml_config_key "${file}" "extensions sumologic api_base_url"
}

function get_user_opamp_endpoint() {
Expand All @@ -1229,7 +1229,7 @@ function get_user_opamp_endpoint() {
return
fi

read_yaml_config_key $file "extensions opamp endpoint"
read_yaml_config_key "${file}" "extensions opamp endpoint"
}

function get_user_tags() {
Expand All @@ -1240,7 +1240,7 @@ function get_user_tags() {
return
fi

read_yaml_config_key $file "extensions sumologic collector_fields"
read_yaml_config_key "${file}" "extensions sumologic collector_fields"
}

function get_fields_to_compare() {
Expand Down Expand Up @@ -1285,7 +1285,7 @@ function write_sumologic_extension() {
local file
readonly file="${1}"

write_yaml_config_key $file "extensions sumologic" "{}"
write_yaml_config_key "${file}" "extensions sumologic" "{}"
}

# write installation token to user configuration file
Expand All @@ -1296,7 +1296,7 @@ function write_installation_token() {
local file
readonly file="${2}"

write_yaml_config_key $file "extensions sumologic installation_token" $token
write_yaml_config_key "${file}" "extensions sumologic installation_token" "${token}"
}

# write ${ENV_TOKEN}" to systemd env configuration file
Expand Down Expand Up @@ -1375,7 +1375,7 @@ function write_ephemeral_true() {
local file
readonly file="${1}"

write_yaml_config_key $file "extensions sumologic ephemeral" "true"
write_yaml_config_key "${file}" "extensions sumologic ephemeral" "true"
}

# write api_url to user configuration file
Expand All @@ -1386,7 +1386,7 @@ function write_api_url() {
local file
readonly file="${2}"

write_yaml_config_key $file "extensions sumologic api_base_url" $api_url
write_yaml_config_key "${file}" "extensions sumologic api_base_url" "${api_url}"
}

# write opamp endpoint to user configuration file
Expand All @@ -1397,7 +1397,7 @@ function write_opamp_endpoint() {
local file
readonly file="${2}"

write_yaml_config_key $file "extensions opamp endpoint" $opamp_endpoint
write_yaml_config_key "${file}" "extensions opamp endpoint" "${opamp_endpoint}"
}

# write tags to user configuration file
Expand All @@ -1408,7 +1408,7 @@ function write_tags() {
local file
readonly file="${2}"

write_yaml_config_key $file "extensions sumologic collector_fields" $fields
write_yaml_config_key "${file}" "extensions sumologic collector_fields" "${fields}"
}

# configure and enable the opamp extension for remote management
Expand All @@ -1422,15 +1422,15 @@ function write_opamp_extension() {
local api_url
readonly api_url="${5}"

write_yaml_config_key $file "extensions opamp remote_configuration_directory" $directory
write_yaml_config_key "${file}" "extensions opamp remote_configuration_directory" "${directory}"

# if a different base url is specified, configure the corresponding opamp endpoint
if [[ -n "${api_url}" ]]; then
write_yaml_config_key $file "extensions opamp endpoint" $api_url
write_yaml_config_key "${file}" "extensions opamp endpoint" "${api_url}"
fi

# enable the opamp extension
append_yaml_config_list $file "service extensions" "opamp"
append_yaml_config_list "${file}" "service extensions" "opamp"
}

function get_binary_from_branch() {
Expand Down

0 comments on commit d5bbfeb

Please sign in to comment.