Resolve SC2001: 'See if you can use ${var//search/replace} instead'

https://github.com/koalaman/shellcheck/wiki/SC2001
This commit is contained in:
Dan Callahan
2015-11-02 19:42:16 -06:00
parent e1e7fbcc52
commit ff07842dc5
2 changed files with 2 additions and 3 deletions

View File

@@ -145,7 +145,7 @@ nginx_build_config() {
if [[ -z "$DOKKU_APP_LISTEN_PORT" ]] && [[ -z "$DOKKU_APP_LISTEN_IP" ]]; then
shopt -s nullglob
for DOKKU_APP_IP_FILE in $DOKKU_ROOT/$APP/IP.web.*; do
DOKKU_APP_PORT_FILE=$(echo $DOKKU_APP_IP_FILE | sed -e "s:IP:PORT:g")
DOKKU_APP_PORT_FILE="${DOKKU_APP_IP_FILE//IP/PORT}"
DOKKU_APP_LISTENER_IP=$(< $DOKKU_APP_IP_FILE)
DOKKU_APP_LISTENER_PORT=$(< $DOKKU_APP_PORT_FILE)