1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

cut quotes from additional package var earlier on (#224)

* cut quotes from additional package var earlier on
* add easy debugging switch to script and predefine env var in base image
This commit is contained in:
Felix Bartels
2019-08-28 20:49:31 +02:00
committed by GitHub
parent 4878fc9917
commit 26c45ce1db
5 changed files with 14 additions and 6 deletions
+3 -1
View File
@@ -7,14 +7,16 @@ ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
ADDITIONAL_KOPANO_WEBAPP_PLUGINS=${ADDITIONAL_KOPANO_WEBAPP_PLUGINS:-""}
set -eu # unset variables are errors & non-zero return values exit the whole script
[ "$DEBUG" ] && set -x
# shellcheck source=php/start-helper.sh
source /kopano/start-helper.sh
ADDITIONAL_KOPANO_PACKAGES="$ADDITIONAL_KOPANO_PACKAGES $ADDITIONAL_KOPANO_WEBAPP_PLUGINS"
ADDITIONAL_KOPANO_PACKAGES=$(echo "$ADDITIONAL_KOPANO_PACKAGES" | tr -d '"')
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && apt update
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && for installpkg in $(echo "$ADDITIONAL_KOPANO_PACKAGES" | tr -d '"'); do
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && for installpkg in $ADDITIONAL_KOPANO_PACKAGES; do
# shellcheck disable=SC2016 disable=SC2086
if [ "$(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c 'ok installed')" -eq 0 ]; then
apt --assume-yes --no-upgrade install "$installpkg"