summaryrefslogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorTilo Spannagel <development@tilosp.de>2018-03-08 09:52:55 +0100
committerTilo Spannagel <development@tilosp.de>2018-03-08 12:24:16 +0100
commita82a812df022e59abb36e19d1803022aba0864c2 (patch)
treef5aead46beaa2d753860fc6e4185f850d7b8a700 /update.sh
parent5c05c9eba0a97e36fca6d0e00a4da66db9544b9c (diff)
Use var for the php version
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index dc54b070..c14a551a 100755
--- a/update.sh
+++ b/update.sh
@@ -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;