| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_getConfigValue { |
| |
| |
| local CONFIG_ABSPATH="$1" |
| |
| |
| |
| local CONFIG_SECTION="$2" |
| |
| |
| local CONFIG_VARNAME="$3" |
| |
| |
| local CONFIG_LINES=$(cli_getConfigLines \ |
| "$CONFIG_ABSPATH" "$CONFIG_SECTION" "$CONFIG_VARNAME") |
| |
| |
| |
| local CONFIG_VARVALUE=$(echo $CONFIG_LINES \ |
| | gawk 'BEGIN { FS="=" } { print $2 }' \ |
| | sed -r 's/^"(.*)"$/\1/') |
| |
| |
| echo "$CONFIG_VARVALUE" |
| |
| } |