diff options
author | Tilo Spannagel <development@tilosp.de> | 2018-03-08 09:52:55 +0100 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2018-03-08 12:24:16 +0100 |
commit | a82a812df022e59abb36e19d1803022aba0864c2 (patch) | |
tree | f5aead46beaa2d753860fc6e4185f850d7b8a700 /update.sh | |
parent | 5c05c9eba0a97e36fca6d0e00a4da66db9544b9c (diff) |
Use var for the php version
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,10 @@ #!/bin/bash set -eo pipefail +declare -A php_version=( + [default]='7.1' +) + declare -A cmd=( [apache]='apache2-foreground' [fpm]='php-fpm' @@ -59,6 +63,7 @@ for latest in "${latests[@]}"; do # Replace the variables. sed -ri -e ' + s/%%PHP_VERSION%%/'"${php_version[$version]-${php_version[default]}}"'/g; s/%%VARIANT%%/'"$variant"'/g; s/%%VERSION%%/'"$latest"'/g; s/%%CMD%%/'"${cmd[$variant]}"'/g; |